diff options
author | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-14 11:48:09 -0300 |
---|---|---|
committer | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-14 11:53:23 -0300 |
commit | 62bc10abee02c4312e5e9c77b134d6f70d45ad37 (patch) | |
tree | 778679bdbfabe904ad62f1098975523da20dd2b8 | |
parent | 218206fc3f23b12f94d378505ede4ea10cc84193 (diff) |
removes mail converter
-rw-r--r-- | service/app/adapter/mail_converter.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/service/app/adapter/mail_converter.py b/service/app/adapter/mail_converter.py deleted file mode 100644 index 28b83d6d..00000000 --- a/service/app/adapter/mail_converter.py +++ /dev/null @@ -1,49 +0,0 @@ -import dateutil.parser as dateparser - - -class MailConverter: - LEAP_FLAGS = ['\\Seen', - '\\Answered', - '\\Flagged', - '\\Deleted', - '\\Draft', - '\\Recent', - 'List'] - - def __init__(self, mail_service): - pass - - def date_to_iso(self, date): - return dateparser.parse(date).isoformat() - - def from_mail(self, imap_mail): - - headers = imap_mail.hdoc.content['headers'] - body = imap_mail.bdoc.content - - return { - 'header': { - 'from': [headers['From']], - 'to': [headers['To']], - 'cc': headers.get('CC', []), - 'bcc': headers.get('BCC', []), - 'date': self.date_to_iso(headers['Date']), - 'subject': headers['Subject'] - }, - 'ident': imap_mail.getUID(), - 'tags': imap_mail.getFlags(), - 'status': [], - 'security_casing': {}, - 'body': body['raw'] - } - - def to_mail(self, pixelated_mail, account): - raise NotImplementedError() - - - def from_tag(self, imap_tag): - raise NotImplementedError() - - - def from_contact(self, imap_contact): - raise NotImplementedError() |