Cannot connect to IMAP server in Python 3.2

Rob Williscroft rtw at rtw.me.uk
Thu Apr 5 01:25:28 EDT 2012


Steven D'Aprano wrote in news:4f7d2475$0$11113$c3e8da3 at news.astraweb.com in 
gmane.comp.python.general:

> I can connect to an IMAP server using Python 2.6:
> 
> steve at runes:~$ python2.6 
> Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) 

>>>> server = imaplib.IMAP4_SSL('xxxxx')
 
> But when I try with Python 3.2, it just sits there until it times out:

>>>> server = imaplib.IMAP4('xxxxx', imaplib.IMAP4_SSL_PORT)
 
> What am I doing wrong?
> 

Not using IMAP4_SSL, above you are using IMAP4 (non SSL) but with the 
SSL port.

http://docs.python.org/py3k//library/imaplib.html#imaplib.IMAP4_SSL




More information about the Python-list mailing list