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

Tobiah toby at rcsreg.com
Wed Aug 23 16:23:57 EDT 2006


Thank you for the valuable clarification, and the pointers.
I will look into the RFC's.  I wonder though, whether that
will solve my main question, which is why the python.org
example mandates that I specify 'from' and 'to' twice.

Thanks,

Tobiah

Ben Finney wrote:
> tobiah <st at tobiah.org> writes:
> 
> 
>>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.
> 
> 
> [Pet hate issue: Every RFC 2822 email message has exactly *one* body
> and *one* header. 



More information about the Python-list mailing list