mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +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
a5d120a68b
commit
4ba809b835
1 changed files with 2 additions and 1 deletions
|
@ -1022,7 +1022,8 @@ 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:
|
||||
server.starttls()
|
||||
if os.getenv("SMTP_TLS", 'True') != "False":
|
||||
server.starttls()
|
||||
|
||||
# Login to your email account
|
||||
server.login(smtp_username, smtp_password)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue