[Tutor] smtp connection problem --- socket error 10061

Evert Rol evert.rol at gmail.com
Sat Sep 11 01:39:50 CEST 2010

> I could not connect with gmail smtp server in Vista 32( worked ok in XP 32). Both vista and xp have same anti-virus software.
>>>> smtplib.SMTP("smtp.gmail.com",587)
> Traceback (most recent call last):
>  File "<pyshell#1>", line 1, in <module>
>    smtplib.SMTP("smtp.gmail.com",587)
>  File "C:\Program Files\Python25\lib\smtplib.py", line 244, in __init__
>    (code, msg) = self.connect(host, port)
>  File "C:\Program Files\Python25\lib\smtplib.py", line 310, in connect
>    raise socket.error, msg
> error: (10061, 'Connection refused')
> I am using IPV4 for my vista wireless connection. No improvement with firewall disabled.
> Any one has this problem? any solution?

Do things work when you use SSL or TLS (through SMTP_SSL or using starttls, respectively)? Perhaps Vista is more strict in checking for this when connecting through a secure port (465 for SSL, 587 for TLS).

It's just a very simple guess, because I have no access to any Windows system.

More information about the Tutor mailing list