Albert
Albert

Reputation: 143

How can I change email sender's name in django

I'm creating email system in my django project and faced to next question: Send email from custom email sender name, f.e. sending email from gmail(btw it works in my project) requires sending messages only from gmail account, same thing with smtp-pulse, sendgrid and etc. . My question is: May I use any of already configured smtp servers in my case, or I only need to create my own using smtplib(f.e) and configure it? Tried:

DEFAULT_FROM_EMAIL = '[email protected]'
SERVER_EMAIL = '[email protected]'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 2525
EMAIL_USE_TLS = False
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'password'

This one doesn't work. Same with mail.ru/smtp-pulse.com

Upvotes: 5

Views: 2763

Answers (1)

Artisan
Artisan

Reputation: 2124

Try

DEFAULT_FROM_EMAIL = "Site Support <[email protected]>"

Upvotes: 13

Related Questions