Am using gmail smtp to send email messages and it works fine. The only problem is that I want receipients of the email to reply to a different email address. In other words I send them an email as from me@gmail.com but when they click reply the message should be replied to another@gmail.com or another@yahoo.com. How can I accomplish this please.
In my settings.py I have:
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'me@gmail.com'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_PORT = 587
In my views.py I have:
email = EmailMessage(
subject='Registration Successful',
body=msg,
from_email='My Name <me@gmail.com>',
to='recipient@gmail.com')
email.send()
This works but the recipient replies to me@gmail.com. I want the recipient to reply to another@gmail.com. Please What do I need to do to this code.
Try adding a
Reply-Toheader to the email: