How to use the imaplib2.IMAP4.error function in imaplib2

To help you get started, we’ve selected a few imaplib2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github assembl / assembl / assembl / processes / imaplib2_source_reader.py View on Github external
#print "UID searched with: "+ command + ", got result "+repr(search_status)+" and found "+repr(search_result)
                email_ids = search_result[0].split()

            if len(email_ids):
                print "Processing messages from IMAP: %d "% (len(email_ids))
                for email_id in email_ids:
                    self.import_email(email_id)
                    if self.status != ReaderStatus.READING:
                        break
            else:
                print "No IMAP messages to process"
            self.successful_read()
            self.set_status(ReaderStatus.PAUSED)
        except IMAP4.abort as e:
            raise IrrecoverableError(e)
        except IMAP4.error as e:
            raise ClientError(e)

imaplib2

A threaded Python IMAP4 client.

MIT
Latest version published 3 years ago

Package Health Score

63 / 100
Full package analysis

Similar packages