mozillazg's Blog
  • Feed
  • About
  • Archives

[django]解决发送密码重置邮件的发件人是 "webmaster@localhost" 的问题

2013-06-04

django Tags django / python / send_mail
  • 参考

默认情况下,django 将通过 webmaster@localhost 发送密码重置邮件。

这明显不是我们想要的,更改 settings.py 文件即可修复这个问题。

增加一个配置项 DEFAULT_FROM_EMAIL:

DEFAULT_FROM_EMAIL = 'foo@bar.com'

此时的发件人将会是:foo@bar.com

参考

  • Re: [Django] #13847: PasswordResetForm sends emails using "webmaster@localhost" - Django - com.googlegroups.django-updates - MarkMail

微信扫一扫:分享

Scan me!

微信里点“发现”,扫一下

二维码便可将本文分享至朋友圈。

有任何建议和想法欢迎在下方评论区留言或者加我微信交流

Related Posts:

  • [django]通过自定义 Model Field 的方式将上传的文本文件按 UTF-8 编码保存
  • [django]修复 "TypeError: delete() got an unexpected keyword argument 'using'"
  • [django]修复 "dictionary update sequence element 0 has length 1, 2 is required"
  • [django]按天分组统计数据
  • [django]按小时分组统计数据

Comments


© 2025 mozillazg · Powered by pelican-bootstrap3, Pelican, Bootstrap · Privacy

Creative Commons License "mozillazg's Blog" by mozillazg is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where indicated otherwise.

Back to top