summaryrefslogtreecommitdiff
path: root/Mailman/Bouncer.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Bouncer.py')
-rw-r--r--Mailman/Bouncer.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py
index 99093b334..f4a8ce90f 100644
--- a/Mailman/Bouncer.py
+++ b/Mailman/Bouncer.py
@@ -247,28 +247,3 @@ class Bouncer:
msg.send(self)
info.noticesleft -= 1
info.lastnotice = time.localtime()[:3]
-
- def bounce_message(self, msg, e=None):
- # Bounce a message back to the sender, with an error message if
- # provided in the exception argument.
- sender = msg.get_sender()
- subject = msg.get('subject', _('(no subject)'))
- subject = Utils.oneline(subject,
- Utils.GetCharSet(self.preferred_language))
- if e is None:
- notice = _('[No bounce details are available]')
- else:
- notice = _(e.notice)
- # Currently we always craft bounces as MIME messages.
- bmsg = Message.UserNotification(msg.get_sender(),
- self.owner_address,
- subject,
- lang=self.preferred_language)
- # BAW: Be sure you set the type before trying to attach, or you'll get
- # a MultipartConversionError.
- bmsg.set_type('multipart/mixed')
- txt = MIMEText(notice,
- _charset=Utils.GetCharSet(self.preferred_language))
- bmsg.attach(txt)
- bmsg.attach(MIMEMessage(msg))
- bmsg.send(self)