#imaplib.Debug = 4
class MailIterator:
- """This class communicates with the e-mail server."""
+ """This class communicates with the IMAP server."""
# class attributes
# IMAP4_SSL for connection with an IMAP server
# connect to server
try:
- self.mail_con = imaplib.IMAP4(server)
+ self.mail_con = imaplib.IMAP4_SSL(server)
logging.info("Connected to %s", server)
except socket.error as ex:
logging.error("Could not connect to host: %s", ex)