smtplib needs me to put from/to headers in the message?

tobiah st at tobiah.org
Wed Aug 23 18:59:58 EDT 2006


In the example at:

	http://docs.python.org/lib/SMTP-example.html

The text of the email message ends up with the From:
and To: headers in it, and yet the call to sendmail()
on the server object requires me to specify them again.

Shouldn't smptlib just make the headers for me, given
the 'from' and 'to' addresses?  Perhaps this allows
me to spoof the 'from' address.  Still, I might as well
just make all of the headers myself, and pass the message
as a single argument to sendmail().

Or perhaps I'm missing it altogether.

Thanks,

Tobiah

-- 
Posted via a free Usenet account from http://www.teranews.com




More information about the Python-list mailing list