🚧 add ehlo command
All checks were successful
ci / docker (push) Successful in 5m34s
Python formatting PEP8 / Python-PEP8 (push) Successful in 14s

This commit is contained in:
Finn Christiansen 2024-09-21 12:51:17 +02:00
parent 45696f9d7d
commit 249be53a82

View file

@ -99,6 +99,7 @@ The link will be valid for 7 days.""".format(os.getenv("REGISTRATION_URL") + res
try: try:
# Connect to the SMTP server # Connect to the SMTP server
server = smtplib.SMTP(os.getenv("SMTP_HOSTNAME"), os.getenv("SMTP_PORT")) server = smtplib.SMTP(os.getenv("SMTP_HOSTNAME"), os.getenv("SMTP_PORT"))
server.ehlo()
server.starttls() # Secure the connection server.starttls() # Secure the connection
server.login(os.getenv("SMTP_USERNAME"), os.getenv("SMTP_PASSWORD")) # Login to the server server.login(os.getenv("SMTP_USERNAME"), os.getenv("SMTP_PASSWORD")) # Login to the server