We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b029f7b + 5ca3c7b commit f013a7fCopy full SHA for f013a7f
syslogdiag/emailing.py
@@ -87,12 +87,11 @@ def _send_msg(msg: MIMEMultipart):
87
# Send the message via our own SMTP server, but don't include the
88
# envelope header.
89
s = smtplib.SMTP(email_server, email_port)
90
- context = ssl.create_default_context()
91
- # add tls for those using yahoo or gmail.
92
- # try:
93
- # s.starttls(context=context)
94
- # except:
95
- # pass
+
+ try:
+ s.starttls()
+ except:
+ pass
96
s.login(email_address, email_pwd)
97
s.sendmail(me, [you], msg.as_string())
98
s.quit()
0 commit comments