简体   繁体   English

django注册并发送激活电子邮件

[英]django registration and sending activation email

Like the title suggest, i am having problems sending my activation email. 就像标题所示,我在发送激活电子邮件时遇到问题。

It gives me [Errno 61] Connection refused when i press my activate email button. 它给了我[Errno 61]当我按下激活电子邮件按钮时,连接被拒绝。

Can someone guide me on how to configure the settings? 有人可以指导我如何配置设置吗?

My current settings.py 我当前的settings.py

# Registration settings
ACCOUNT_ACTIVATION_DAYS = 2
EMAIL_HOST = 'localhost'
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
LOGIN_REDIRECT_URL = '/'

Also if there is a need to implement SMTP, tell me how too. 另外,如果需要实施SMTP,也请告诉我。

Thanks in advance! 提前致谢! :D :D

The solution was to open up another terminal window and put in the command: python -m smtpd -n -c DebuggingServer localhost:1025 解决方案是打开另一个终端窗口,并输入以下命令:python -m smtpd -n -c DebuggingServer localhost:1025

That would solve all things 那会解决所有问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM