mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
Allow optional usage of the tls encryption for SMTPA
For local dev, a local SMTP server like mailhog is useful and allow to manually manage user creation
This commit is contained in:
parent
b39c53f64c
commit
f7883bd3b9
1 changed files with 2 additions and 1 deletions
|
@ -1035,6 +1035,7 @@ async def send_email(sender_name, sender_email, receiver_email, subject, html):
|
|||
print_verbose(f"SMTP Connection Init")
|
||||
# Establish a secure connection with the SMTP server
|
||||
with smtplib.SMTP(smtp_host, smtp_port) as server:
|
||||
if os.getenv("SMTP_TLS", 'True') != "False":
|
||||
server.starttls()
|
||||
|
||||
# Login to your email account
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue