diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-08-20 16:03:49 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-08-20 16:03:49 +0100 |
commit | 744e86bbaa5f521908100f4fd3c8b8fc43a894f4 (patch) | |
tree | 1c2b7406f2b916c10d7fbc41b53bd2c93a39e471 /alot/account.py | |
parent | 7e17485e77441d0d9c27f77ff7d06c91c6e80a67 (diff) | |
parent | e6d68139f063c48a0b1cf29dfbe012e460b31ce8 (diff) |
Merge branch 'develop' into addressbook
Conflicts:
alot/account.py
alot/command.py
Diffstat (limited to 'alot/account.py')
-rw-r--r-- | alot/account.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/alot/account.py b/alot/account.py index 2e1fae81..d4bc0673 100644 --- a/alot/account.py +++ b/alot/account.py @@ -37,6 +37,7 @@ class Account: this account's settings, can send and store mails to maildirs (drafts/send) """ + address = None """this accounts main email address""" aliases = [] @@ -46,12 +47,16 @@ class Account: gpg_key = None """gpg fingerprint. CURRENTLY IGNORED""" signature = None - """signature to append to outgoing mails. CURRENTLY IGNORED""" + """signature to append to outgoing mails""" + signature_filename = None + """filename of signature file in attachment""" abook = None + """addressbook""" def __init__(self, address=None, aliases=None, realname=None, gpg_key=None, - signature=None, sent_box=None, draft_box=None, - abook=None): + signature=None, signature_filename=None, sent_box=None, + draft_box=None, abook=None): + self.address = address self.abook = abook self.aliases = [] @@ -60,10 +65,11 @@ class Account: self.realname = realname self.gpg_key = gpg_key self.signature = signature + self.signature_filename = signature_filename self.sent_box = None if sent_box: - mburl = urlparse(sent_mailbox) + mburl = urlparse(sent_box) if mburl.scheme == 'mbox': self.sent_box = mailbox.mbox(mburl.path) elif mburl.scheme == 'maildir': @@ -77,7 +83,7 @@ class Account: self.draft_box = None if draft_box: - mburl = urlparse(sent_mailbox) + mburl = urlparse(draft_box) if mburl.scheme == 'mbox': self.draft_box = mailbox.mbox(mburl.path) elif mburl.scheme == 'maildir': @@ -99,11 +105,11 @@ class Account: """ mbx.lock() if isinstance(mbx, mailbox.Maildir): - msg = mailbox.MaildirMessage(email) + msg = mailbox.MaildirMessage(mail) msg.set_flags('S') else: - msg = mailbox.Message(email) - key = mbx.add(email) + msg = mailbox.Message(mail) + key = mbx.add(mail) mbx.flush() mbx.unlock() @@ -168,6 +174,7 @@ class AccountManager: 'aliases', 'gpg_key', 'signature', + 'signature_filename', 'type', 'sendmail_command', 'abook_command', |