--- test-mailman-2.1/Mailman/ListAdmin.py 2009-12-21 10:50:22.000000000 -0800 +++ test-mailman/Mailman/ListAdmin.py 2011-03-05 17:19:50.453125000 -0800 @@ -31,6 +31,7 @@ from cStringIO import StringIO import email +from email.MIMEText import MIMEText from email.MIMEMessage import MIMEMessage from email.Generator import Generator from email.Utils import getaddresses @@ -337,8 +338,22 @@ lang=lang) finally: i18n.set_translation(otrans) - fmsg.set_type('message/rfc822') - fmsg.attach(copy) + if rejection == 'Refused' and comment: + # If we're rejecting and we have a comment, include it. + fmsg_comment = MIMEText(_( +"""A moderator rejected this message with the reason + +"%(comment)s" + +The original message is attached. +"""), _charset=Utils.GetCharSet(lang)) + fmsg_message = MIMEMessage(copy) + fmsg.set_type('multipart/mixed') + fmsg.attach(fmsg_comment) + fmsg.attach(fmsg_message) + else: + fmsg.set_type('message/rfc822') + fmsg.attach(copy) fmsg.send(self) # Log the rejection if rejection: