diff --git a/py12306/helpers/notification.py b/py12306/helpers/notification.py index 9e4818f..700b119 100644 --- a/py12306/helpers/notification.py +++ b/py12306/helpers/notification.py @@ -90,6 +90,8 @@ class Notification(): try: server = smtplib.SMTP(Config().EMAIL_SERVER_HOST) server.login(Config().EMAIL_SERVER_USER, Config().EMAIL_SERVER_PASSWORD) + server.ehlo() + server.starttls() server.send_message(message) server.quit() CommonLog.add_quick_log(CommonLog.MESSAGE_SEND_EMAIL_SUCCESS).flush()