Browse Source

email_util: 修改邮件

Signed-off-by: Binren Zhnag <zhangbr@elab-plus.com>
Binren Zhnag 5 years ago
parent
commit
5e99fa9b47
1 changed files with 5 additions and 4 deletions
  1. 5 4
      email_util.py

+ 5 - 4
email_util.py

@@ -8,11 +8,12 @@ from email.encoders import encode_base64
 import traceback
 import os
 
+# https://blog.csdn.net/chuxu8314/article/details/100618710
 
 class EmailUtil(object):
-    host_server = 'smtp.exmail.qq.com'
-    sender_email = 'zhangbr@elab-plus.com'
-    pwd = '306492mnA'
+    host_server = 'smtp.qq.com'
+    sender_email = '1285211525@qq.com'
+    pwd = 'rstydfukfpzoidgi'
     send_name = 'elab'
     receiver = ['1285211525@qq.com', 'lijm@elab-plus.com', 'xuanxc@elab-plus.com']
 
@@ -27,7 +28,7 @@ class EmailUtil(object):
                   ):
         global smtp
         try:
-            smtp = SMTP_SSL(self.host_server, 465)
+            smtp = SMTP(self.host_server)
             smtp.set_debuglevel(1)
             smtp.ehlo(self.host_server)
             smtp.login(self.sender_email, self.pwd)