NTB WPZ Automation - EMail Downloader
|
Used to download emails and parse the attachments from them. More...
Public Member Functions | |
def | __init__ (self, hostname, username, password, download_path='./', max_workers=8) |
def | get_email_list_since_date (self, date) |
Get a list of emails since a given date. More... | |
def | download_all_attachments_since_date (self, date) |
Download all attachments in emails since a given date. More... | |
def | threaded_download (self, message_number) |
A function to download the attachment from a given email in a thread safe way A single imaplib.IMAP4_SSL is NOT thread safe. More... | |
Static Public Member Functions | |
def | download_attachment_from_email (message, download_path='./') |
Method to parse out the encoded attachment from an email attachment. More... | |
Public Attributes | |
client | |
download_path | |
hostname | |
username | |
password | |
threads | |
Used to download emails and parse the attachments from them.
def Email.EmailGetter.__init__ | ( | self, | |
hostname, | |||
username, | |||
password, | |||
download_path = './' , |
|||
max_workers = 8 |
|||
) |
def Email.EmailGetter.download_all_attachments_since_date | ( | self, | |
date | |||
) |
Download all attachments in emails since a given date.
date | The datetime.date object representing the date to look back to |
|
static |
Method to parse out the encoded attachment from an email attachment.
message | The email message object to parse the attachment from |
download_path | The path to download the file to on the disk, ./ by default |
def Email.EmailGetter.get_email_list_since_date | ( | self, | |
date | |||
) |
Get a list of emails since a given date.
date | The datetime.date object representing the date to look back to |
def Email.EmailGetter.threaded_download | ( | self, | |
message_number | |||
) |
A function to download the attachment from a given email in a thread safe way A single imaplib.IMAP4_SSL is NOT thread safe.
message_number | the number of the message to download the attachment from |
Email.EmailGetter.client |
Email.EmailGetter.download_path |
Email.EmailGetter.hostname |
Email.EmailGetter.password |
Email.EmailGetter.threads |
Email.EmailGetter.username |