diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-08-18 18:33:24 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-08-18 18:33:24 +0100 |
commit | 2aead82dd6feddb5b95e76421d0385deb6f5978c (patch) | |
tree | 9a7fed2ba323d9ba1a8485e0279cd6b13a6c628b /alot | |
parent | 74b149d2a20476445ff6ebe78fd235b1b38f1af8 (diff) |
add 'signature_filename' in accounts
this lets you specify the filename used
in the signature attachment
Diffstat (limited to 'alot')
-rw-r--r-- | alot/account.py | 7 | ||||
-rw-r--r-- | alot/command.py | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/alot/account.py b/alot/account.py index 33cda217..58640d38 100644 --- a/alot/account.py +++ b/alot/account.py @@ -42,9 +42,12 @@ class Account: """gpg fingerprint. CURRENTLY IGNORED""" signature = None """path to a signature file to append to outgoing mails.""" + signature_filename = None + """filename of signature file in attachment""" def __init__(self, address=None, aliases=None, realname=None, gpg_key=None, - signature=None, sent_box=None, draft_box=None): + signature=None, signature_filename=None, sent_box=None, + draft_box=None): self.address = address self.aliases = [] if aliases: @@ -52,6 +55,7 @@ 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: @@ -160,6 +164,7 @@ class AccountManager: 'aliases', 'gpg_key', 'signature', + 'signature_filename', 'type', 'sendmail_command', 'sent_box', diff --git a/alot/command.py b/alot/command.py index cc7950c2..2b6bc30a 100644 --- a/alot/command.py +++ b/alot/command.py @@ -839,7 +839,11 @@ class EnvelopeSendCommand(Command): if account.signature: sig = os.path.expanduser(account.signature) if os.path.isfile(sig): - helper.attach(sig, mail, filename='signature') + if account.signature_filename: + name = account.signature_filename + else: + name = None + helper.attach(sig, mail, filename=name) else: ui.notify('could not locate signature: %s' % sig, priority='error') if not ui.choice('send without signature') == 'yes': |