47

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?

you have your different options.

DEFAULT_FROM_EMAIL
EMAIL_HOST
EMAIL_PASSWORD
...

but the email result still ends in from: noreply@mydomain.com and I would like to change this into My Domain instead.

ApPeL
  • 4,801
  • 9
  • 47
  • 84

1 Answers1

106

set DEFAULT_FROM_EMAIL

DEFAULT_FROM_EMAIL = 'My Domain <noreply@mydomain.com>'
JPG
  • 82,442
  • 19
  • 127
  • 206
Ashok
  • 10,373
  • 3
  • 36
  • 23
  • 8
    IS there any reason why Django requires EMAIL_FROM setting to be set, but in the same time only DEFAULT_FROM_EMAIL is being used? – The Godfather Nov 15 '17 at 09:02
  • @TheGodfather Which version that django requires EMAIL_FROM? I have looked at the documentation https://docs.djangoproject.com/en/1.8/ref/settings since version 1.8 until 3.1 (now), that EMAIL_FROM settings not found. – aijogja Mar 22 '21 at 11:59
  • @aijogja it was 3 years ago, I don't even remember =) But as my comment got a few upvotes, I assume I was not the only one getting this inconsistency. Maybe it was fixed in the meantime, maybe it was some undocumented behavior, who knows... – The Godfather Mar 22 '21 at 16:08