本文介绍了Django default_from_email名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Django的default_from_email地址中添加一个名称,并想知道是否通过settings.py文件执行此操作?

I am looking to add a name to my default_from_email address in Django and wanted to know whether you do this through the settings.py file?

您有不同的选择.

DEFAULT_FROM_EMAIL
EMAIL_HOST
EMAIL_PASSWORD
...

,但电子邮件结果仍以[email protected]结尾,我想将其更改为My Domain.

but the email result still ends in from: [email protected] and I would like to change this into My Domain instead.

推荐答案

设置

DEFAULT_FROM_EMAIL = 'My Domain <[email protected]>'

这篇关于Django default_from_email名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 03:23