From 86a12d9ff521abf620255255c29e3c115d2ac4ac Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 4 Oct 2012 21:45:52 -0400 Subject: [PATCH] Convert message string to bytes for sendmail. --- rss2email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.26.2