Alex Rivera | Logout

How do I add "Reply To" to this in Django?

Asked 2011-03-09T09:34:00.847
12
msg = EmailMessage(subject, body, from_email, [to_email])
msg.content_subtype = "html"
msg.send()

How do I add the "reply to" header?

Edit
Report

1 Answer

26

You'll want to add a Reply-To header to the EmailMessage.

headers = {'Reply-To': reply_email}
msg = EmailMessage(subject, body, from_email, [to_email], headers=headers)
msg.content_subtype = "html"
msg.send()
answered 2011-03-09T09:35:35.273

Your Answer