Wednesday, 18 September 2013

IMAPLIB socket.error: [Errno 104] Connection reset by peer

IMAPLIB socket.error: [Errno 104] Connection reset by peer

using login() method of imaplib throws
socket.error: [Errno 104] Connection reset by peer
Sometimes the same code works and some times it doesn't. please explain
the reason of it and how to overcome this error
import imaplib
imap_server = imaplib.IMAP4_SSL('imap.gmail.com')
print imap_server
imap_server.login('xxxxxxxxxx@gmail.com', 'xxxxxxxxxxx')
imap_server.select('INBOX')

No comments:

Post a Comment