diff options
| author | bwarsaw | 2002-02-28 18:52:54 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-02-28 18:52:54 +0000 |
| commit | b2135d567bba8458d71abac8227bc8deb80404ca (patch) | |
| tree | bcca945c1d256a6a0a073e5882770efd52addb9a | |
| parent | 3b808d2eefff44bf7203af8fc12d331270393ac9 (diff) | |
| download | mailman-b2135d567bba8458d71abac8227bc8deb80404ca.tar.gz mailman-b2135d567bba8458d71abac8227bc8deb80404ca.tar.zst mailman-b2135d567bba8458d71abac8227bc8deb80404ca.zip | |
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.
| -rw-r--r-- | Mailman/Handlers/Hold.py | 7 |
1 files 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) |
