邮箱注册报错error: [Errno 10061]
来源:6-10 用户注册-4
Pian步
2017-02-21
邮箱注册的时候报错了,数据库里有注册的用户,新浪邮箱没有发送邮件
不明白哪错了,求帮忙
6回答
-
bobby
2017-03-13
settings 文件 配置名称写错了 EMIAL_HOST_USER = 'j506520072@sina.com'
仔细看看这是啥 “EMIAL_HOST_USER”
00 -
bobby
2017-02-22
我看看你的settings配置 我看看参数配置有没有问题
012017-02-22 -
bobby
2017-02-21
你可以使用课程中的邮箱试试能不能发送, 因为涉及到不同的邮箱设置可能会有不一样的地方 所以你先用课程中提供的邮箱试一下先确定代码没有问题 然后再去看看怎么设置自己的邮箱
052017-09-06 -
天涯明月笙
2017-03-10
单步运行的时候会在执行完send_register_email函数的send_status = send_mail(email_title,email_body,EMAIL_FROM,[email])后跳回post里面的send_register_email(user_name,'register'),
我也遇到这个问题了,不会显示status_code的值,直接跳转回views,并且没有成功发送邮件
试了好几个邮箱了,都不行
112017-04-11 -
Pian步
提问者
2017-02-22
昨天试了下163和QQ邮箱都不行,然后不知道动了哪里发现BUG变了
---------------------------BUG---------------------------------
SMTPSenderRefused at /register/
(530, 'Authentication required', u'j506520072@sina.com')
Request Method: POST
Request URL: http://127.0.0.1:8000/register/
Django Version: 1.9.8
Exception Type: SMTPSenderRefused
Exception Value:
(530, 'Authentication required', u'j506520072@sina.com')
Exception Location: c:\python27\Lib\smtplib.py in sendmail, line 736
Python Executable: C:\Users\Administrator\Envs\stars\Scripts\python.exe
Python Version: 2.7.12
Python Path:
['C:\\Users\\Administrator\\PycharmProjects\\StarsOnline\\extra_apps',
'C:\\Users\\Administrator\\PycharmProjects\\StarsOnline\\apps',
'C:\\Users\\Administrator\\PycharmProjects\\StarsOnline',
'C:\\Users\\Administrator\\PycharmProjects\\StarsOnline',
'C:\\Users\\Administrator\\PycharmProjects\\StarsOnline\\extra_apps',
'C:\\Users\\Administrator\\PycharmProjects\\StarsOnline\\apps',
'C:\\Windows\\system32\\python27.zip',
'C:\\Users\\Administrator\\Envs\\stars\\DLLs',
'C:\\Users\\Administrator\\Envs\\stars\\lib',
'C:\\Users\\Administrator\\Envs\\stars\\lib\\plat-win',
'C:\\Users\\Administrator\\Envs\\stars\\lib\\lib-tk',
'C:\\Users\\Administrator\\Envs\\stars\\Scripts',
'c:\\python27\\Lib',
'c:\\python27\\DLLs',
'c:\\python27\\Lib\\lib-tk',
'C:\\Users\\Administrator\\Envs\\stars',
'C:\\Users\\Administrator\\Envs\\stars\\lib\\site-packages']
------------------------------settings.py--------------------------------
EMAIL_HOST = 'smtp.sina.com' EMAIL_PORT = 25 EMIAL_HOST_USER = 'j506520072@sina.com' EMAIL_HOST_PASSWORD = '50207176AA' EMAIL_USE_TLS = False EMAIL_FROM = 'j506520072@sina.com'
--------------------------------email_send.py---------------------------------
def send_register_email(email,send_type='register'): email_record = EmailVerifyRecord() code = random_str(16) email_record.code = code email_record.email = email email_record.send_type = send_type email_record.save() email_title = '' email_body = '' if send_type == 'register': email_title = u'星星学习网注册激活链接' email_body = u'请点击下面的连接激活你的账号:http://127.0.0.1:8000/active/{0}'.format(code) send_status = send_mail(email_title,email_body,EMAIL_FROM,[email]) if send_status: pass
032017-04-11 -
Pian步
提问者
2017-02-21
单步运行的时候会在执行完send_register_email函数的send_status = send_mail(email_title,email_body,EMAIL_FROM,[email])后跳回post里面的send_register_email(user_name,'register'),然后再点F6会跳到base.py
def dispatch(self, request, *args, **kwargs):
# Try to dispatch to the right method; if a method doesn't exist,
# defer to the error handler. Also defer to the error handler if the
# request method isn't on the approved list.
if request.method.lower() in self.http_method_names:
handler = getattr(self, request.method.lower(), self.http_method_not_allowed)
else:
handler = self.http_method_not_allowed
return handler(request, *args, **kwargs)跳到return这里
062018-08-05
相似问题