diff options
author | Jim Popovitch <jimpop@gmail.com> | 2016-10-11 15:26:21 +0000 |
---|---|---|
committer | Jim Popovitch <jimpop@gmail.com> | 2016-10-11 15:26:21 +0000 |
commit | 8d98726fc0aa73ab8ab17822b4331e91162f722f (patch) | |
tree | 3cb74ad8d52f64d10ab90884e35527c7bbe43d27 | |
parent | 2fa8a893c410648ee86d28d379f717f2a83d0fd1 (diff) | |
download | mailman2-8d98726fc0aa73ab8ab17822b4331e91162f722f.tar.gz mailman2-8d98726fc0aa73ab8ab17822b4331e91162f722f.tar.xz mailman2-8d98726fc0aa73ab8ab17822b4331e91162f722f.zip |
Further changes to keep domains aligned with virtual list notification emails
-rw-r--r-- | Mailman/Cgi/create.py | 5 | ||||
-rw-r--r-- | Mailman/Handlers/Moderate.py | 5 | ||||
-rwxr-xr-x | Mailman/ListAdmin.py | 12 | ||||
-rw-r--r-- | Mailman/MTA/Manual.py | 12 |
4 files changed, 12 insertions, 22 deletions
diff --git a/Mailman/Cgi/create.py b/Mailman/Cgi/create.py index dd862208..cac5a2e7 100644 --- a/Mailman/Cgi/create.py +++ b/Mailman/Cgi/create.py @@ -250,10 +250,9 @@ def process_request(doc, cgidata): 'requestaddr' : mlist.GetRequestEmail(), 'siteowner' : siteowner, }, mlist=mlist) - msg = Message.UserNotification( - owner, siteowner, + msg = Message.OwnerNotification(mlist, _('Your new mailing list: %(listname)s'), - text, mlist.preferred_language) + text=text, tomoderators=0) msg.send(mlist) # Success! diff --git a/Mailman/Handlers/Moderate.py b/Mailman/Handlers/Moderate.py index 199c97ac..f9e79cbe 100644 --- a/Mailman/Handlers/Moderate.py +++ b/Mailman/Handlers/Moderate.py @@ -174,10 +174,9 @@ def do_discard(mlist, msg): lang = mlist.preferred_language varhelp = '%s/?VARHELP=privacy/sender/discard_these_nonmembers' % \ mlist.GetScriptURL('admin', absolute=1) - nmsg = Message.UserNotification(mlist.GetOwnerEmail(), - mlist.GetBouncesEmail(), + nmsg = Message.OwnerNotification(mlist, _('Auto-discard notification'), - lang=lang) + lang=lang, tomoderators=0) nmsg.set_type('multipart/mixed') text = MIMEText(Utils.wrap(_( 'The attached message has been automatically discarded.')), diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py index af579331..13502352 100755 --- a/Mailman/ListAdmin.py +++ b/Mailman/ListAdmin.py @@ -403,10 +403,8 @@ class ListAdmin: }, mlist=self) # This message should appear to come from the <list>-owner so as # to avoid any useless bounce processing. - owneraddr = self.GetOwnerEmail() - msg = Message.UserNotification(owneraddr, owneraddr, subject, text, - self.preferred_language) - msg.send(self, **{'tomoderators': 1}) + msg = Message.OwnerNotification(self, subject, text=text, + tomoderators=1) # Restore the user's preferred language. i18n.set_language(lang) @@ -460,10 +458,8 @@ class ListAdmin: }, mlist=self) # This message should appear to come from the <list>-owner so as # to avoid any useless bounce processing. - owneraddr = self.GetOwnerEmail() - msg = Message.UserNotification(owneraddr, owneraddr, subject, text, - self.preferred_language) - msg.send(self, **{'tomoderators': 1}) + msg = Message.OwnerNotification(self, subject, text=text, + tomoderators=1) def __handleunsubscription(self, record, value, comment): addr = record diff --git a/Mailman/MTA/Manual.py b/Mailman/MTA/Manual.py index 92e1c03c..46adfae2 100644 --- a/Mailman/MTA/Manual.py +++ b/Mailman/MTA/Manual.py @@ -94,10 +94,9 @@ equivalent) file by adding the following lines, and possibly running the # this request. siteowner = Utils.get_site_email(extra='owner') # Should this be sent in the site list's preferred language? - msg = Message.UserNotification( - siteowner, siteowner, + msg = Message.OwnerNotification(mlist, _('Mailing list creation request for list %(listname)s'), - sfp.getvalue(), mm_cfg.DEFAULT_SERVER_LANGUAGE) + sfp.getvalue()) msg.send(mlist) @@ -135,12 +134,9 @@ equivalent) file by removing the following lines, and possibly running the if not cgi: print >> outfp return - siteowner = Utils.get_site_email(extra='owner') - # Should this be sent in the site list's preferred language? - msg = Message.UserNotification( - siteowner, siteowner, + msg = Message.OwnerNotification(mlist, _('Mailing list removal request for list %(listname)s'), - sfp.getvalue(), mm_cfg.DEFAULT_SERVER_LANGUAGE) + sfp.getvalue()) msg['Date'] = email.Utils.formatdate(localtime=1) outq = get_switchboard(mm_cfg.OUTQUEUE_DIR) outq.enqueue(msg, recips=[siteowner], nodecorate=1) |