aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/email/interactive/be-handle-mail
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-18 09:21:03 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-18 09:21:03 -0400
commitc1a84ab2e9fbdc28fde4ba377e65e9c8e53ee64f (patch)
tree3e0f21bcdc5fd928fe64e6c0565c3613864a8ae6 /interfaces/email/interactive/be-handle-mail
parent6c0b67973dd95dfdc0ddfb29edfb793773f7115c (diff)
downloadbugseverywhere-c1a84ab2e9fbdc28fde4ba377e65e9c8e53ee64f.tar.gz
Added "to_unicode" to send_pgp_mime.flatten()
be-handle-mail wants unicode output, since all it's internal processing is done with unicode. However, the flatten calls in send_pgp_mime work with the encoded binary string output, and execute(sendmail, stdin=flatten(msg, to_unicode=True)) fails with Exception: u while executing /usr/sbin/sendmail -t sendmail: fatal: wking(1001): No recipient addresses found in message header
Diffstat (limited to 'interfaces/email/interactive/be-handle-mail')
-rwxr-xr-xinterfaces/email/interactive/be-handle-mail8
1 files changed, 5 insertions, 3 deletions
diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail
index 3129ef4..d8aafb2 100755
--- a/interfaces/email/interactive/be-handle-mail
+++ b/interfaces/email/interactive/be-handle-mail
@@ -62,7 +62,7 @@ class InvalidEmail (ValueError):
def stderr_msg(self):
err_text = [u"Invalid email (particular type unknown):\n",
unicode(self), u"",
- send_pgp_mime.flatten(self.msg)]
+ send_pgp_mime.flatten(self.msg, to_unicode=True)]
return u"\n".join(err_text)
class InvalidSubject (InvalidEmail):
@@ -205,7 +205,9 @@ def compose_response(ret, out_text, err_text, info):
if LOGFILE != None:
LOGFILE.write("responding to %s: %s\n"
% (info["author_addr"], info["command"]))
- LOGFILE.write("\n%s\n\n" % send_pgp_mime.flatten(response_email.plain()))
+ LOGFILE.write("\n%s\n\n"
+ % send_pgp_mime.flatten(response_email.plain(),
+ to_unicode=True))
return response_email
def open_logfile(logpath=None):
@@ -263,7 +265,7 @@ def main():
sys.exit(1)
response_email = compose_response(ret, out_text, err_text, info).plain()
if options.output == True:
- print send_pgp_mime.flatten(response_email)
+ print send_pgp_mime.flatten(response_email, to_unicode=True)
else:
send_pgp_mime.mail(response_email, send_pgp_mime.sendmail)
close_logfile()