summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-12-30 14:25:20 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2011-12-30 14:25:20 +0000
commit4b679a5e18a8f193d402e1e7360cf5090557187e (patch)
tree25592ca7c51824c3365ea43dd88d70884659f077
parent27639a112832eda359a4f4a6f1e136d818dc4127 (diff)
added account option 'signature_as_attachment'
that causes the content of the signature file to be appended to the initial body text of an envelope instead of attached
-rw-r--r--alot/account.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/alot/account.py b/alot/account.py
index 21e0a64a..b1387c2a 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -40,13 +40,16 @@ class Account(object):
"""signature to append to outgoing mails"""
signature_filename = None
"""filename of signature file in attachment"""
+ signature_as_attachment = None
+ """attach signature file instead of appending its content to body text"""
abook = None
"""addressbook (:class:`AddressBook`) managing this accounts contacts"""
def __init__(self, dbman, address=None, aliases=None, realname=None,
gpg_key=None, signature=None, signature_filename=None,
- sent_box=None, sent_tags=['sent'], draft_box=None,
- draft_tags=['draft'], abook=None):
+ signature_as_attachment=False, sent_box=None,
+ sent_tags=['sent'], draft_box=None, draft_tags=['draft'],
+ abook=None):
self.dbman = dbman
self.address = address
self.abook = abook
@@ -57,6 +60,7 @@ class Account(object):
self.gpg_key = gpg_key
self.signature = signature
self.signature_filename = signature_filename
+ self.signature_as_attachment = signature_as_attachment
self.sent_box = None
if sent_box:
@@ -192,6 +196,7 @@ class AccountManager(object):
'gpg_key',
'signature',
'signature_filename',
+ 'signature_as_attachment',
'type',
'sendmail_command',
'abook_command',
@@ -230,6 +235,11 @@ class AccountManager(object):
regexp = None # will use default in constructor
args['abook'] = MatchSdtoutAddressbook(cmd, match=regexp)
+ if 'signature_as_attachment' in options:
+ value = config.getboolean(s, 'signature_as_attachment')
+ args['signature_as_attachment'] = value
+ options.remove('signature_as_attachment')
+
to_set = self.manditory
for o in options:
if o not in self.parse_lists: