summaryrefslogtreecommitdiff
path: root/src/mailman/email
diff options
context:
space:
mode:
authorBarry Warsaw2016-10-31 20:09:23 -0400
committerBarry Warsaw2016-10-31 20:09:23 -0400
commit589c4c62d4fa0b79dd4e742c50cf79bd8d4558ca (patch)
treefc7c0f375b987df14cf3a2c914e3ad6b3f590469 /src/mailman/email
parent7a584735bd890a736ea2f27d0f488177b52d90b0 (diff)
downloadmailman-589c4c62d4fa0b79dd4e742c50cf79bd8d4558ca.tar.gz
mailman-589c4c62d4fa0b79dd4e742c50cf79bd8d4558ca.tar.zst
mailman-589c4c62d4fa0b79dd4e742c50cf79bd8d4558ca.zip
Diffstat (limited to 'src/mailman/email')
-rw-r--r--src/mailman/email/message.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mailman/email/message.py b/src/mailman/email/message.py
index 7c811d797..786dc11d0 100644
--- a/src/mailman/email/message.py
+++ b/src/mailman/email/message.py
@@ -132,7 +132,7 @@ class UserNotification(Message):
self['To'] = recipients
self.recipients = set([recipients])
- def send(self, mlist, add_precedence=True, tomoderators=False, **_kws):
+ def send(self, mlist, *, add_precedence=True, to_moderators=False, **_kws):
"""Sends the message by enqueuing it to the 'virgin' queue.
This is used for all internally crafted messages.
@@ -142,6 +142,9 @@ class UserNotification(Message):
:param add_precedence: Flag indicating whether a `Precedence: bulk`
header should be added to the message or not.
:type add_precedence: bool
+ :param to_moderators: Flag indicating whether the message should be
+ sent to the list's moderators instead of the list's membership.
+ :type to_moderators: bool
This function also accepts arbitrary keyword arguments. The key/value
pairs for **kws is added to the metadata dictionary associated with
@@ -159,7 +162,7 @@ class UserNotification(Message):
# don't override an existing Precedence: header.
if 'precedence' not in self and add_precedence:
self['Precedence'] = 'bulk'
- if tomoderators:
+ if to_moderators:
self.recipients = set(
member.address.email
for member in mlist.moderators.members