From b2135d567bba8458d71abac8227bc8deb80404ca Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 28 Feb 2002 18:52:54 +0000 Subject: hold_for_approval(): Instead of using add_header to set to set the Content-Type: header, and since we should be setting the charset anyway, on the message that goes to the admin, set the lang argument to the UserNotification, and then just set the type (via set_type()) to multipart/mixed. --- Mailman/Handlers/Hold.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py index 672a5881c..5ca1fb4eb 100644 --- a/Mailman/Handlers/Hold.py +++ b/Mailman/Handlers/Hold.py @@ -236,10 +236,9 @@ def hold_for_approval(mlist, msg, msgdata, exc): d['subject'] = usersubject # craft the admin notification message and deliver it subject = _('%(listname)s post from %(sender)s requires approval') - nmsg = Message.UserNotification(owneraddr, owneraddr, subject) - nmsg.add_header('Content-Type', 'multipart/mixed', - charset=charset) - nmsg['MIME-Version'] = '1.0' + nmsg = Message.UserNotification(owneraddr, owneraddr, subject, + lang=lang) + nmsg.set_type('multipart/mixed') text = MIMEText( Utils.maketext('postauth.txt', d, raw=1, mlist=mlist), _charset=charset) -- cgit v1.2.3-70-g09d2