How do I change the from line on a mail sent using smtplib? [duplicate]
Question
Possible Duplicate:
Specify a sender when sending mail with Python (smtplib)
I'm using smtplib to send a mail in python. When I view a sent mail, the from line only says "contact" because I have FROM = "contact@foo.com". However, I'd like the from line to read "foo" instead (but still have an email recipient reply to contact@foo.com). Any advice?
Solution
Try this:
FROM = "Foo <contact@foo.com>"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow