summaryrefslogtreecommitdiff
path: root/Mailman/ListAdmin.py
diff options
context:
space:
mode:
authorbwarsaw1998-07-06 15:48:01 +0000
committerbwarsaw1998-07-06 15:48:01 +0000
commitea9b5057870f99553003f4bb8c4534be30e3fa16 (patch)
tree88bffed2e591762eafa8b531900db0f6f3295899 /Mailman/ListAdmin.py
parent2a85306bcb9528027d1da53f8679baf4f22012f4 (diff)
downloadmailman-ea9b5057870f99553003f4bb8c4534be30e3fa16.tar.gz
mailman-ea9b5057870f99553003f4bb8c4534be30e3fa16.tar.zst
mailman-ea9b5057870f99553003f4bb8c4534be30e3fa16.zip
RefuseRequest(): Convert to maketext()
Diffstat (limited to 'Mailman/ListAdmin.py')
-rw-r--r--Mailman/ListAdmin.py42
1 files changed, 13 insertions, 29 deletions
diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py
index 0bc64cad4..d670669e8 100644
--- a/Mailman/ListAdmin.py
+++ b/Mailman/ListAdmin.py
@@ -187,35 +187,19 @@ class ListAdmin:
return id
def RefuseRequest(self, request, destination_email, comment, msg=None):
- # XXX: convert to Utils.maketext() style
- text = '''Your request to the '%s' mailing-list:
-
- %s
-
-Has been rejected by the list moderator.
-''' % (self.real_name, request)
- if comment:
- text = text + '''
-The moderator gave the following reason for rejecting your request:
-
- %s
-
-''' % comment
- text = text + 'Any questions or comments should be directed to %s.\n' \
- % self.GetAdminEmail()
+ text = Utils.maketext(
+ 'refuse.txt',
+ {'listname' : self.real_name,
+ 'request' : request,
+ 'reason' : comment or '[No reason given]',
+ 'adminaddr': self.GetAdminEmail(),
+ })
+ # add in original message, but not wrap/filled
if msg:
- text = text + '''
-Your original message follows:
-
-%s
-
-%s
-''' % (string.join(msg.headers, ''), msg.body)
-
+ text = text + string.join(msg.headers, '') + '\n\n' + msg.body
+ else:
+ text = text + '[Original message unavailable]'
+ # send it
self.SendTextToUser(subject = '%s request rejected' % self.real_name,
recipient = destination_email,
- text = text,
- # XXX: some of this text should probably be
- # wrapped by calling mm_utils.wrap() separately
- raw = 1)
-
+ text = text)