python create mail

Peter Hansen peter at engcorp.com
Thu Jan 12 08:41:00 EST 2006


anyab5 at gmail.com wrote:
> hey I need help in sending email,
> 
> It seems that while using  this set of commands
> 
> from smtplib import SMTP
> 
>  s = SMTP()
>  s.set_debuglevel(1)
>  s.connect('outmail.huji.ac.il')
> 
> I should be able to get a connection but what I get is this error
[snip]

Try connecting with telnet from the command line.

   telnet outmail.huji.ac.il 25

You should see some sort of greeting from the server, probably starting 
with "220".

If that works, then the Python code should work.  If that does not work, 
then it's not a Python problem (firewall, host rejecting your address, 
no SMTP server on that host, etc).

-Peter




More information about the Python-list mailing list