summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))