Index: roundup/mailer.py =================================================================== --- roundup/mailer.py (revision 4212) +++ roundup/mailer.py (working copy) @@ -141,24 +141,20 @@ elif error_messages_to == "both": to.append(dispatcher_email) - message = self.get_standard_message(to, subject) + message = self.get_standard_message(to, subject, multipart=True) # add the error text - part = MIMEText(error) + part = MIMEText('\n'.join(error)) message.attach(part) # attach the original message to the returned message try: bounced_message.rewindbody() - except IOError, message: - body.write("*** couldn't include message body: %s ***" - % bounced_message) + except IOError, errmessage: + part = MIMEText("*** couldn't include message body: %s ***" + % errmessage) else: - body.write(bounced_message.fp.read()) - part = MIMEText(bounced_message.fp.read()) - part['Content-Disposition'] = 'attachment' - for header in bounced_message.headers: - part.write(header) + part = MIMEText(bounced_message.fp.read()) message.attach(part) # send