summaryrefslogtreecommitdiff
path: root/alot/account.py
diff options
context:
space:
mode:
authorLucas Hoffmann <lucc@posteo.de>2018-10-10 15:39:08 +0200
committerLucas Hoffmann <lucc@posteo.de>2018-10-10 15:39:08 +0200
commit5df7871f11dd694d45aad89f28a680cb46e57c52 (patch)
tree92417c4c58da707c5383fc0553d8e7cffa95f4c0 /alot/account.py
parent878369dda0dbac2860f616f4095523d892f6b9e6 (diff)
Improve error notification on failing sendmail
Diffstat (limited to 'alot/account.py')
-rw-r--r--alot/account.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/alot/account.py b/alot/account.py
index a28519d1..c8f3c09a 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -350,7 +350,9 @@ class SendmailAccount(Account):
# make sure self.mail is a string
out, err, code = await call_cmd_async(cmdlist, stdin=str(mail))
if code != 0:
- raise Exception
+ msg = 'The sendmail command {} returned with code {}{}'.format(
+ self.cmd, code, ':\n' + err.strip() if err else '.')
+ raise Exception(msg)
except Exception as e:
logging.error(str(e))
raise SendingMailFailed(str(e))