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

Carl J. Van Arsdall cvanarsdall at mvista.com
Thu Aug 24 12:20:27 EDT 2006


Dennis Lee Bieber wrote:
> On Wed, 23 Aug 2006 20:23:57 +0000, Tobiah <toby at rcsreg.com> declaimed
> the following in comp.lang.python:
>
>   
>> 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.
>>
>>     
>
> 	Though it might be useful to extend the library with an optional
> parameter that specifies "parse message for addresses to use"...
>   

I actually agree with this, not to say that it wouldn't be difficult to 
write that function, but I think it would be a definite nicety. 

I've always thought that the best way to do it would be to construct the 
message in its entirety, this would include to, from, etc.  Then 
whatever smtp library is available simply takes that message and a 
server and handles the rest.  I don't think that the current 
functionality should be stripped out or anything, but that this other 
"interface" exist for a much more intuitive emailing system.

-carl



-- 

Carl J. Van Arsdall
cvanarsdall at mvista.com
Build and Release
MontaVista Software




More information about the Python-list mailing list