def connect(self,imap_host): "Connect with the host" self.mail = imaplib.IMAP4_SSL(imap_host) return self.mail