From: Thomas Jarosch Date: Fri, 13 Jul 2012 07:58:19 +0000 (+0200) Subject: We documented we use SSL, so actually do it X-Git-Url: http://developer.intra2net.com/git/?p=imap-mark-seen;a=commitdiff_plain;h=25ef1a0c09d59262bb271d0d9d738302bab6216e We documented we use SSL, so actually do it --- diff --git a/src/mail_iterator.py b/src/mail_iterator.py index 1f6f81c..6e3afdd 100644 --- a/src/mail_iterator.py +++ b/src/mail_iterator.py @@ -25,7 +25,7 @@ MAILBOX_RESP = re.compile(r'\((?P.*?)\) "(?P.*)" (?P.*)' #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 @@ -40,7 +40,7 @@ class MailIterator: # 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)