mirror of https://github.com/tp4a/teleport
修正:SMTP邮件发送与Exchange 2016兼容性问题(#82)
parent
2c487e9fc1
commit
0f3c8900dd
|
@ -113,6 +113,11 @@ def tp_send_mail(recipient, message, subject=None, sender=None, cc=None, bcc=Non
|
|||
if dbg_mode:
|
||||
_smtp.set_debuglevel(1)
|
||||
_smtp.ehlo()
|
||||
if _smtp.has_extn("starttls"):
|
||||
try:
|
||||
_smtp.starttls()
|
||||
except:
|
||||
pass
|
||||
|
||||
_smtp.login(_username, _password)
|
||||
|
||||
|
|
Loading…
Reference in New Issue