emai - Multiple recipenets in "To:"

Aurelio Martin amartin at wpsnetwork.com
Wed Mar 10 09:21:29 CET 2004


Miki Tebeka wrote:
> Hello All,
> 

...

>     s.sendmail(main["From"], main["To"], msgstr)

s.sendmail expects a list of recipients as the second parameter. You are 
passing a string. Try :

       s.sendmail( main["From"], main["To"].split(", "), msgstr)



More information about the Python-list mailing list