Fixed multipart bug in be-handle-mail.Message.response_email()
authorW. Trevor King <wking@drexel.edu>
Sun, 19 Jul 2009 15:47:30 +0000 (11:47 -0400)
committerW. Trevor King <wking@drexel.edu>
Sun, 19 Jul 2009 15:47:30 +0000 (11:47 -0400)
I hadn't attached the mutipart body to the .response_header, which
meant that the reply lacked target email addresses, etc.

interfaces/email/interactive/be-handle-mail

index 5e1953ea70176481d958ac96efdf4a7043ab38cc..1ca53fae0482010659d2a2a83c8e0200bfecf437 100755 (executable)
@@ -468,13 +468,12 @@ class Message (object):
     def response_email(self):
         assert len(self._response_messages) > 0
         if len(self._response_messages) == 1:
-            ret = send_pgp_mime.attach_root(self.response_header,
-                                            self._response_messages[0])
+            response_body = self._response_messages[0])
         else:
-            ret = MIMEMultipart()
+            repsonse_body = MIMEMultipart()
             for message in self._response_messages:
-                ret.attach(message)
-        return ret
+                resposne_body.attach(message)
+        return send_pgp_mime.attach_root(self.response_header, response_body)
 
 def open_logfile(logpath=None):
     """