From fa91c8e7d73b4784c545487db9dcefc3264a8500 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Tue, 12 Mar 2002 07:35:48 +0000 Subject: UserNotification.__init__(): If no text argument is given, don't set the character set. The most common reason for this is that the notification message is a multipart/mixed and it makes no sense to give those type of messages a charset. .send(): Set the `nodecorate' key to 1 so that messages that original from the virgin queue don't get headers and footers. --- Mailman/Message.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Mailman/Message.py') diff --git a/Mailman/Message.py b/Mailman/Message.py index ebbe328b5..ac7c347d7 100644 --- a/Mailman/Message.py +++ b/Mailman/Message.py @@ -154,10 +154,7 @@ class UserNotification(Message): charset = None if lang is not None: charset = Charset(Utils.GetCharSet(lang)) - if text is None: - self.set_charset(charset) - else: - # Implies a set_charset() call + if text is not None: self.set_payload(text, charset) if subject is None: subject = '(no subject)' @@ -190,4 +187,5 @@ class UserNotification(Message): virginq.enqueue(self, listname = mlist.internal_name(), recips = self.recips, + nodecorate = 1, **_kws) -- cgit v1.2.3-70-g09d2