From 45ce85afde99cafbdf1925bf1055f25b828a1855 Mon Sep 17 00:00:00 2001 From: Jalin Date: Tue, 15 Jan 2019 23:24:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=82=AE=E7=AE=B1=20ssl=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20#33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py12306/helpers/notification.py | 2 ++ 1 file changed, 2 insertions(+) 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()