summaryrefslogtreecommitdiff
path: root/Mailman/Deliverer.py
diff options
context:
space:
mode:
authorbwarsaw2002-10-15 05:46:54 +0000
committerbwarsaw2002-10-15 05:46:54 +0000
commitd9f5819ff345690274cd4154a42bd1f8671d2071 (patch)
tree960bd244447394ced02fb12e14331e3554d95045 /Mailman/Deliverer.py
parentdcdc9e00947a5e0b3e71b5bcb8ff3c3174d4a7da (diff)
downloadmailman-d9f5819ff345690274cd4154a42bd1f8671d2071.tar.gz
mailman-d9f5819ff345690274cd4154a42bd1f8671d2071.tar.zst
mailman-d9f5819ff345690274cd4154a42bd1f8671d2071.zip
ForwardMessage(): Change the signature a bit to use the new
OwnerNotification class in Message.py. We don't need the recips argument since we're always going to calculate that from self's owners and moderators (if the tomoderators flag is true).
Diffstat (limited to '')
-rw-r--r--Mailman/Deliverer.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Mailman/Deliverer.py b/Mailman/Deliverer.py
index 5b2447003..96db58cfa 100644
--- a/Mailman/Deliverer.py
+++ b/Mailman/Deliverer.py
@@ -119,11 +119,8 @@ your membership administrative address, %(addr)s.'''))
msg['X-No-Archive'] = 'yes'
msg.send(self)
- def ForwardMessage(self, msg, recips=None, text=None, subject=None):
+ def ForwardMessage(self, msg, text=None, subject=None, tomoderators=1):
# Wrap the message as an attachment
- if recips is None:
- recips = self.owner[:]
- recips.extend(self.moderator)
if text is None:
text = _('No reason given')
if subject is None:
@@ -131,9 +128,11 @@ your membership administrative address, %(addr)s.'''))
text = MIMEText(Utils.wrap(text),
_charset=Utils.GetCharSet(self.preferred_language))
attachment = MIMEMessage(msg)
- notice = Message.UserNotification(
- recips, self.GetBouncesEmail(), subject,
- lang=self.preferred_language)
+ notice = Message.OwnerNotification(
+ self, self.GetBouncesEmail(), subject,
+ lang=self.preferred_language,
+ tomoderators=tomoderators)
+ # Make it look like the message is going to the -owner address
notice.set_type('multipart/mixed')
notice.attach(text)
notice.attach(attachment)