Browse Source

阿里云邮件推送

chenjunkai 6 years ago
parent
commit
4bccf5829d
2 changed files with 3 additions and 2 deletions
  1. 1 1
      Controller/DeviceShare.py
  2. 2 1
      Object/AWS/SesClassObject.py

+ 1 - 1
Controller/DeviceShare.py

@@ -99,4 +99,4 @@ class DeviceShareView(View):
             else:
                 return response.json(174)
         else:
-            return response.json(444, {'param': 'shareToken'})
+            return response.json(444, {'param': 'shareToken'})

+ 2 - 1
Object/AWS/SesClassObject.py

@@ -61,7 +61,8 @@ class SesClassObject:
            # python 2.7以上版本,若需要使用SSL,可以这样创建client
            # client = smtplib.SMTP_SSL()
            # SMTP普通端口为25或80
-           client.connect('smtpdm.aliyun.com', 25)
+           # client.connect('smtpdm.aliyun.com', 25)
+           client.connect('smtpdm-ap-southeast-2.aliyun.com', 80)
            # 开启DEBUG模式
            client.set_debuglevel(0)
            client.login(username, password)