summaryrefslogtreecommitdiff
path: root/alot/account.py
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2018-08-16 20:53:43 +0200
committerLucas Hoffmann <lucc@posteo.de>2018-09-22 16:30:22 +0200
commit878369dda0dbac2860f616f4095523d892f6b9e6 (patch)
tree8b9a59cfd65549df26bf5f649a423f8b67d2a257 /alot/account.py
parent5b00a4ecd30d21ceeebb16eefbed4c48cfe3ba4a (diff)
Check the return code from 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 f8438564..a28519d1 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -348,7 +348,9 @@ class SendmailAccount(Account):
try:
# make sure self.mail is a string
- out, *_ = await call_cmd_async(cmdlist, stdin=str(mail))
+ out, err, code = await call_cmd_async(cmdlist, stdin=str(mail))
+ if code != 0:
+ raise Exception
except Exception as e:
logging.error(str(e))
raise SendingMailFailed(str(e))