djangodjango-allauth

How to change the Display Name on sent emails with django allauth?


I'm using django allauth to sign up users and sending confirmation emails to new users and it's working fine except that it shows "support" as in "support@example.com" as my name. I'd like it to change that to "Khaled from XYZ".

I tried the following but it actually crashed the smtp connection:

EMAIL_HOST_USER = 'Khaled from XYZ <support@example.com>'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER

Solution

  • EMAIL_HOST_USER needs to be the username your SMTP server expects for authentication.

    DEFAULT_FROM_EMAIL is what gets put in the email header, and can be more verbose:

    EMAIL_HOST_USER = 'support@example.com'
    DEFAULT_FROM_EMAIL = 'Khaled from XYZ <support@example.com>'