summaryrefslogtreecommitdiff
path: root/src/mailman/chains/hold.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-08-23 20:19:26 -0400
committerBarry Warsaw2011-08-23 20:19:26 -0400
commit688d222e7af971ef75383703be0bf4fdf12661ce (patch)
tree393c3db9f40565ea3a2c174cdd293c1961b1816c /src/mailman/chains/hold.py
parent35e4ca77838ac7bbeca3f8da6ea64a93a6e501d5 (diff)
downloadmailman-688d222e7af971ef75383703be0bf4fdf12661ce.tar.gz
mailman-688d222e7af971ef75383703be0bf4fdf12661ce.tar.zst
mailman-688d222e7af971ef75383703be0bf4fdf12661ce.zip
Diffstat (limited to 'src/mailman/chains/hold.py')
-rw-r--r--src/mailman/chains/hold.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mailman/chains/hold.py b/src/mailman/chains/hold.py
index 7b78f118e..dd7276aed 100644
--- a/src/mailman/chains/hold.py
+++ b/src/mailman/chains/hold.py
@@ -64,22 +64,22 @@ class HoldNotification(ChainNotification):
-def autorespond_to_sender(mlist, sender, lang=None):
+def autorespond_to_sender(mlist, sender, language=None):
"""Should Mailman automatically respond to this sender?
:param mlist: The mailing list.
:type mlist: `IMailingList`.
:param sender: The sender's email address.
:type sender: string
- :param lang: Optional language.
- :type lang: `ILanguage` or None
+ :param language: Optional language.
+ :type language: `ILanguage` or None
:return: True if an automatic response should be sent, otherwise False.
If an automatic response is not sent, a message is sent indicating
that, er no more will be sent today.
:rtype: bool
"""
- if lang is None:
- lang = mlist.preferred_language
+ if language is None:
+ language = mlist.preferred_language
max_autoresponses_per_day = int(config.mta.max_autoresponses_per_day)
if max_autoresponses_per_day == 0:
# Unlimited.
@@ -104,17 +104,17 @@ def autorespond_to_sender(mlist, sender, lang=None):
response_set.response_sent(address, Response.hold)
# Send this notification message instead.
text = make('nomoretoday.txt',
- language=lang,
+ language=language.code,
sender=sender,
listname=mlist.fqdn_listname,
- num=todays_count,
+ count=todays_count,
owneremail=mlist.owner_address,
)
- with _.using(lang.code):
+ with _.using(language.code):
msg = UserNotification(
sender, mlist.owner_address,
_('Last autoresponse notification for today'),
- text, lang=lang)
+ text, lang=language)
msg.send(mlist)
return False
else: