简体   繁体   中英

Django email subject "EMAIL_SUBJECT_PREFIX" is ignored

I'm using Django + Wagtail + Allauth and I want to change the subject when a user register or forget her/his password:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_SUBJECT_PREFIX = '[Django] '

While I set EMAIL_SUBJECT_PREFIX to '[Django] ', I'm having '[example.com] ' instead.

web_1  | Content-Type: text/plain; charset="utf-8"
web_1  | MIME-Version: 1.0
web_1  | Content-Transfer-Encoding: 7bit
web_1  | Subject: [example.com] Password Reset E-mail
web_1  | From: webmaster@localhost
web_1  | To: me@me.com
web_1  | Date: Wed, 26 Feb 2020 15:04:41 -0000
web_1  | Message-ID: <158272948175.190.1882653498152410368@69079ce78170>

Do you know why ? And if there is another way to change the prefix ?

Just found that I should use: ACCOUNT_EMAIL_SUBJECT_PREFIX .

Please notice that ACCOUNT_EMAIL_SUBJECT_PREFIX is an Allauth setting end not a Django core setting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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