summaryrefslogtreecommitdiff
path: root/alot/account.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-12-21 16:42:53 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2011-12-21 17:10:15 +0000
commitacfbc65ab04b5fd6c5d27fc211324f3798f59704 (patch)
treec93d2580ce98ac46ea1d3bfdcba44cc0c23277f6 /alot/account.py
parent614a36ee0247e5c4b40ca4565aa2a26e68391059 (diff)
use helper.call_cmd in account.send_mail
Diffstat (limited to 'alot/account.py')
-rw-r--r--alot/account.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/account.py b/alot/account.py
index 0404aa82..6eb9f099 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -140,7 +140,8 @@ class SendmailAccount(Account):
def send_mail(self, mail):
mail['Date'] = email.utils.formatdate(time.time(), True)
- out, err = helper.pipe_to_command(self.cmd, mail.as_string())
+ cmdlist = shlex.split(self.cmd.encode('utf-8', errors='ignore'))
+ out, err, retval = helper.call_cmd(cmdlist, stdin=mail.as_string())
if err:
return err + '. sendmail_cmd set to: %s' % self.cmd
self.store_sent_mail(mail)