[Tutor] smtplib starttls() error

Kent Johnson kent37 at tds.net
Tue Jan 9 19:49:18 CET 2007


olen88 wrote:
> Hello,
> 	I was wondering if anyone could point me in the right direction
> 	my system info:
> Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on 
> win32
> 
> 	as the subject says. starttls() returns the following error,
> 
> reply, null = session.starttls();
> File "C:\Python24\lib\smtplib.py", line 601, in starttls
> sslobj = socket.ssl(self.sock, keyfile, certfile)
> AttributeError: 'module' object has no attribute 'ssl'
> 
> I tried,
> 
> import socket
> 
> socket.ssl();
> 
> same AttributeError exception was raised, so this confirmed that
> socket.py has no ssl attribute.

Are you using the standard Python installer from python.org or something 
else? SSL support is a build option. It is included in the standard 
Python for Windows v2.3.5 and 2.4.4. Can you upgrade to the standard 
2.4.4 distribution and see if that works?
> 
> what can I do about this, some answers I digged up suggest
> 
> http://mail.python.org/pipermail/python-list/2003-June/207802.html
> 
> but I am hasty about this suggestion, and wishes to consult to you all
> about what to do.

I don't think that should be needed.

Kent



More information about the Tutor mailing list