summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Warsaw2009-12-12 23:40:59 -0500
committerBarry Warsaw2009-12-12 23:40:59 -0500
commit88b9da7001a2f55465a16d299b021f1143857655 (patch)
tree1ed61045b81307b768e7eeada095d636d4bc7a5d /src
parent725ebe36e2548c5da711087640bd423181411241 (diff)
downloadmailman-88b9da7001a2f55465a16d299b021f1143857655.tar.gz
mailman-88b9da7001a2f55465a16d299b021f1143857655.tar.zst
mailman-88b9da7001a2f55465a16d299b021f1143857655.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/mta/base.py1
-rw-r--r--src/mailman/mta/connection.py8
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mailman/mta/base.py b/src/mailman/mta/base.py
index 38ed0d836..283101256 100644
--- a/src/mailman/mta/base.py
+++ b/src/mailman/mta/base.py
@@ -27,6 +27,7 @@ __all__ = [
import copy
+import socket
import logging
import smtplib
diff --git a/src/mailman/mta/connection.py b/src/mailman/mta/connection.py
index 36af7a06e..9e8f5cbc6 100644
--- a/src/mailman/mta/connection.py
+++ b/src/mailman/mta/connection.py
@@ -65,16 +65,18 @@ class Connection:
self._connection.connect(self._host, self._port)
self._session_count = self._sessions_per_connection
- def sendmail(self, envsender, recips, msgtext):
+ def sendmail(self, envsender, recipients, msgtext):
"""Mimic `smtplib.SMTP.sendmail`."""
if as_boolean(config.mailman.devmode):
# Force the recipients to the specified address, but still deliver
# to the same number of recipients.
- recips = [config.mta.devmode_recipient] * len(recips)
+ recipients = [config.mta.devmode_recipient] * len(recipients)
if self._connection is None:
self._connect()
try:
- results = self._connection.sendmail(envsender, recips, msgtext)
+ log.debug('envsender: %s, recipients: %s, size(msgtext): %s',
+ envsender, recipients, len(msgtext))
+ results = self._connection.sendmail(envsender, recipients, msgtext)
except smtplib.SMTPException:
# For safety, close this connection. The next send attempt will
# automatically re-open it. Pass the exception on up.