re-send EHLO after STARTTLS

This commit is contained in:
Max Erenberg 2021-07-31 08:34:06 -04:00 committed by Max Erenberg
parent 7b749701f0
commit 9227552b29
1 changed files with 1 additions and 1 deletions

View File

@ -44,9 +44,9 @@ class MailService:
client = smtplib.SMTP_SSL(self.host, self.port)
else:
client = smtplib.SMTP(self.host, self.port)
client.ehlo()
if self.starttls:
client.starttls()
client.ehlo()
client.send_message(msg)
client.quit()