smtplib send email by using gmail smtp server

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun May 3 14:08:55 EDT 2009


En Sun, 03 May 2009 12:18:33 -0300, tiefeng wu <icebergwtf at gmail.com>  
escribió:

> I'm tring send email using smtp.gmail.com
>
> here's the code:
>
> *s = SMTP('**smtp.gmail.com* <http://smtp.gmail.com/>*', 25)
> s.set_debuglevel(1)*
> *s.ehlo()
> s.starttls()
> s.ehlo()
> s.login(mygmailaccount, mygmailpassword)
> s.sendmail(from_addr, to_addr_list, message)
> s.close()*

I've tested with 3.0.1 on Windows XP and worked fine. Seems to be a  
problem in the SSL support, but that's all I could say.

-- 
Gabriel Genellina




More information about the Python-list mailing list