summaryrefslogtreecommitdiff
path: root/Mailman/Bouncer.py
diff options
context:
space:
mode:
authorbwarsaw2002-02-11 21:05:10 +0000
committerbwarsaw2002-02-11 21:05:10 +0000
commitd87205740a12b181c91a8880106f117cf809ad66 (patch)
treeff0a9f1811979eb1b7541031cd4f10b0a44e5eb6 /Mailman/Bouncer.py
parentfc4073abb76aad1de0f4e6acba26bd5ae5d4d002 (diff)
downloadmailman-d87205740a12b181c91a8880106f117cf809ad66.tar.gz
mailman-d87205740a12b181c91a8880106f117cf809ad66.tar.zst
mailman-d87205740a12b181c91a8880106f117cf809ad66.zip
__sendAdminBounceNotice(), sendNextNotification(), BounceMessage():
When creating the UserNotification message object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
Diffstat (limited to '')
-rw-r--r--Mailman/Bouncer.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py
index 9f7506080..0c500bf0f 100644
--- a/Mailman/Bouncer.py
+++ b/Mailman/Bouncer.py
@@ -165,7 +165,8 @@ class Bouncer:
}, mlist=self)
subject = _('Bounce action notification')
umsg = Message.UserNotification(self.GetOwnerEmail(),
- siteowner, subject)
+ siteowner, subject,
+ self.preferred_language)
umsg.attach(MIMEText(text))
if isinstance(msg, StringType):
umsg.attach(MIMEText(msg))
@@ -194,7 +195,8 @@ class Bouncer:
info.cookie)
optionsurl = self.GetOptionsURL(member, absolute=1)
subject = 'confirm ' + info.cookie
- requestaddr = self.GetRequestEmail()
+ reqaddr = self.GetRequestEmail()
+ lang = self.getMemberLanguage(member)
text = Utils.maketext(
'disabled.txt',
{'listname' : self.real_name,
@@ -203,8 +205,8 @@ class Bouncer:
'optionsurl' : optionsurl,
'password' : self.getMemberPassword(member),
'owneraddr' : self.GetOwnerEmail(),
- }, lang=self.getMemberLanguage(member), mlist=self)
- msg = Message.UserNotification(member, requestaddr, subject, text)
+ }, lang=lang, mlist=self)
+ msg = Message.UserNotification(member, reqaddr, subject, text, lang)
msg.send(self)
info.noticesleft -= 1
info.lastnotice = time.localtime()[:3]
@@ -221,7 +223,7 @@ class Bouncer:
# Currently we always craft bounces as MIME messages.
bmsg = Message.UserNotification(msg.get_sender(),
self.GetOwnerEmail(),
- subject)
+ subject, self.preferred_language)
bmsg['Content-Type'] = 'multipart/mixed'
bmsg['MIME-Version'] = '1.0'
txt = MIMEText(notice,