From: W. Trevor King Date: Fri, 5 Oct 2012 01:45:52 +0000 (-0400) Subject: Convert message string to bytes for sendmail. X-Git-Tag: v3.0~72^2~25 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=86a12d9ff521abf620255255c29e3c115d2ac4ac;p=rss2email.git Convert message string to bytes for sendmail. --- diff --git a/rss2email.py b/rss2email.py index 2e76e24..7a94c5f 100755 --- a/rss2email.py +++ b/rss2email.py @@ -500,7 +500,7 @@ def sendmail_send(sender, recipient, message, config=None, section='DEFAULT'): ['/usr/sbin/sendmail', recipient], stdin=_subprocess.PIPE, stdout=_subprocess.PIPE, stderr=_subprocess.PIPE) - stdout,stderr = p.communicate(message.as_string()) + stdout,stderr = p.communicate(message.as_string().encode('ascii')) status = p.wait() if status: raise SendmailError(status=status, stdout=stdout, stderr=stderr)