We documented we use SSL, so actually do it
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 13 Jul 2012 07:58:19 +0000 (09:58 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 13 Jul 2012 07:58:19 +0000 (09:58 +0200)
src/mail_iterator.py

index 1f6f81c..6e3afdd 100644 (file)
@@ -25,7 +25,7 @@ MAILBOX_RESP = re.compile(r'\((?P<flags>.*?)\) "(?P<delimiter>.*)" (?P<name>.*)'
 #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)