I am sending emails to users using Django through Google Apps.
When the user receives emails sent from the Django app, they are from:
[email protected]
when looking at all emails in the inbox, people see the email's sender as:
do_not_reply
or [email protected]
depending on the email client used
If I log into that "do_not_reply" account using the browser and Google Apps itself and then send an email to myself, the emails are from:
Don't Reply <[email protected]>
As a result, the name displayed for the email's sender in the inbox is:
Don't Reply
In Django, is there a way to attach a "name" to the email account being used to send emails?
I have reviewed Django's mail.py
, but had no luck finding a solution
http://code.djangoproject.com/browser/django/trunk/django/core/mail.py?rev=5548
Using:
settings.EMAIL_HOST = smtp.gmail.com
Sending Emails with the Django ShellWe import the Django send_mail function. Then we import the settings object which contains all the global settings and the per-site settings (those inside the settings.py file). Finally, we pass all the needed arguments to the send_mail function.
Although Python provides a mail sending interface via the smtplib module, Django provides a couple of light wrappers over it. These wrappers are provided to make sending email extra quick, to help test email sending during development, and to provide support for platforms that can't use SMTP.
How to send multiple mass emails django. We need to create a Tuple of messages and send them using send mass mail. In this tutorial, we create a project which sends email using Django. We fill the data in the form and send it using Django Email.
You can actually use "Don't Reply <[email protected]>"
as the email address you send from.
Try this in the shell of your Django project to test if it also works with gapps:
>>> from django.core.mail import send_mail
>>> send_mail('subject', 'message', "Don't Reply <[email protected]>", ['[email protected]'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With