Skip to content

Commit

Permalink
Update smtp.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kartaris authored Jan 30, 2025
1 parent e914f76 commit 4821eff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fief/services/email/smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def send_email(
if text is not None:
message.add_alternative(text, subtype="plain")

SMTP = smtplib.SMTP if self.ssl and self.starttls else smtplib.SMTP_SSL
SMTP = smtplib.SMTP
if self.ssl and not self.starttls:
SMTP = smtplib.SMTP_SSL

with SMTP(self.host, self.port) as server:
if self.ssl and self.starttls:
Expand Down

0 comments on commit 4821eff

Please sign in to comment.