mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
Merge pull request #1648 from scampion/main
Allow optional usage of the tls encryption for SMTP
This commit is contained in:
commit
9f954fa9eb
1 changed files with 2 additions and 1 deletions
|
|
@ -1035,7 +1035,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
Reference in a new issue