summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1998-08-29 06:39:40 +0000
committerbwarsaw1998-08-29 06:39:40 +0000
commitcbe6dcd0ff513937581dad6cca00ae01c736786c (patch)
tree2fd2369ac45721b17f969a4463c7776975e336d1
parent419e0dfe465c155871722bd17e0a84aa4e318977 (diff)
downloadmailman-cbe6dcd0ff513937581dad6cca00ae01c736786c.tar.gz
mailman-cbe6dcd0ff513937581dad6cca00ae01c736786c.tar.zst
mailman-cbe6dcd0ff513937581dad6cca00ae01c736786c.zip
Use Util.maketext() and move post held message into
templates/postheld.txt
-rwxr-xr-xscripts/post24
1 files changed, 8 insertions, 16 deletions
diff --git a/scripts/post b/scripts/post
index d07a718c5..0f3c6701d 100755
--- a/scripts/post
+++ b/scripts/post
@@ -34,8 +34,9 @@ import paths
from Mailman import MailList
from Mailman import Message
from Mailman import Errors
-
+from Mailman.Utils import maketext
from Mailman.Logging.Utils import LogStdErr
+
LogStdErr("error", "post")
# Only let one program run at once per list.
@@ -73,21 +74,12 @@ try:
subj = msg.getheader('subject')
if not subj:
subj = '[no subject]'
- body = """
-Your mail to '%s' with the subject:
-
-%s
-
-Is being held until the list moderator can review it for approval.
-
-The reason it is being held:
-
- %s
-
-Either the message will get posted to the list, or you will receive
-notification of the moderator's decison.
-""" % (current_list.real_name, subj, err_msg)
-
+ body = maketext(
+ 'postheld.txt',
+ {'list_name': current_list.real_name,
+ 'subject' : subj,
+ 'reason' : err_msg,
+ })
current_list.SendTextToUser( subject = 'Mail sent to %s' %
current_list.real_name,
recipient = the_sender,