You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
腾讯企业邮箱怎么设置,总是提示:[2018-05-07 08:14:42 +0000] [30] [INFO] Booting worker with pid: 30
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 765, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/webapp/srcpm/app/email.py", line 23, in send_async_email
mail.send(msg)
File "/usr/lib/python2.7/site-packages/flask_mail.py", line 491, in send
with self.connect() as connection:
File "/usr/lib/python2.7/site-packages/flask_mail.py", line 144, in enter
self.host = self.configure_host()
File "/usr/lib/python2.7/site-packages/flask_mail.py", line 156, in configure_host
host = smtplib.SMTP_SSL(self.mail.server, self.mail.port)
File "/usr/lib64/python2.7/smtplib.py", line 789, in init
SMTP.init(self, host, port, local_hostname, timeout)
File "/usr/lib64/python2.7/smtplib.py", line 255, in init
(code, msg) = self.connect(host, port)
File "/usr/lib64/python2.7/smtplib.py", line 315, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib64/python2.7/smtplib.py", line 794, in _get_socket
new_socket = socket.create_connection((host, port), timeout)
File "/usr/lib64/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
具体配置如下:
1、部署配置文件修改:
17 #公司邮箱后缀限制,只能使用公司邮箱注册账号。
18 CORP_MAIL = '@qq.com'
...
...
51 # 平台发邮件账号设置
52 SRCPM_MAIL_SENDER = '安全部 3xxx24xxx@qq.com'
53
54 # 发送邮件的服务器设置,账号密码由系统变量中读取
55 MAIL_SERVER = 'smtp.qq.com'
56 MAIL_PORT = 587
57 MAIL_USE_TLS = True
58 MAIL_USERNAME = os.environ.get(
59 'MAIL_USERNAME') or '3xxx24xxx@qq.com'
60 MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') or ''
...
...
70 # 平台发邮件账号设置
71 SRCPM_MAIL_SENDER = '安全部 3xxx24xxx@qq.com'
72
73 # 发送邮件的服务器设置,账号密码由系统变量中读取
74 MAIL_SERVER = 'smtp.qq.com'
75 MAIL_PORT = 25
76 MAIL_USE_TLS = False
77 MAIL_USERNAME = os.environ.get(
78 'MAIL_USERNAME') or '3xxx24xxx@qq.com'
79 MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') or ''
50 #主机名设置
51 SERVER_NAME = 'insight.lxxxxo.com'
...
120 # 平台发邮件账号设置
121 SRCPM_MAIL_SENDER = '安全部 3xxx24xxx@qq.com'
122
123 # 发送邮件的服务器设置,账号密码由系统变量中读取
124 MAIL_SERVER = 'smtp.qq.com'
125 MAIL_PORT = 25
126 MAIL_USE_TLS = False
127 MAIL_USERNAME = os.environ.get(
128 'MAIL_USERNAME') or '3xxx24xxx@qq.com'
129 MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') or ''
2、QQ邮箱设置:
1)给 【安全部 3xxx24xxx@qq.com】邮箱设置一个邮箱独立密码
2)开启QQ邮箱转发功能,并生成用于第三方登录的授权码
3、启动容器的命令:
docker run -d -p 10.10.10.2:9000:5000 \ ###此处是你的主机IP
注:还有一种网上的绕过邮箱验证的方法:
https://note.youdao.com/share/index.html?id=885afcf3ceece652749bc1d9a55f722e&type=note#/
修改配置文件:
[root@insight insight]# vim srcpm/app/auth/views.py
添加 flash(u'srcpm/auth/confirm/{}'.format(token))
直接访问:
http://10.151.138.130:9000/srcpm/auth/confirm/eyJhbGciOiJIUzI1NiIsImV4cCI6MTUyNDIxNjI2MCwiaWF0IjoxNTI0MjEyNjYwfQ.eyJjb25maXJtIjoxN30.Bya7QYZ-bFKC-aYq-SBnoKXJ8Jq4CmnzaW4gw3a4S2M
激活成功。
The text was updated successfully, but these errors were encountered: