summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorPatrick Maia <patrickjourdanmaia@gmail.com>2014-08-14 11:48:09 -0300
committerPatrick Maia <patrickjourdanmaia@gmail.com>2014-08-14 11:53:23 -0300
commit62bc10abee02c4312e5e9c77b134d6f70d45ad37 (patch)
tree778679bdbfabe904ad62f1098975523da20dd2b8 /service
parent218206fc3f23b12f94d378505ede4ea10cc84193 (diff)
removes mail converter
Diffstat (limited to 'service')
-rw-r--r--service/app/adapter/mail_converter.py49
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()