From ea05559a4346b7119287356e408db453e39d1cb7 Mon Sep 17 00:00:00 2001 From: Sriram Viswanathan Date: Wed, 15 Mar 2017 16:22:21 -0300 Subject: |#997| Sriram + Denis | Log recipients while sending message --- service/pixelated/adapter/services/mail_sender.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'service/pixelated') diff --git a/service/pixelated/adapter/services/mail_sender.py b/service/pixelated/adapter/services/mail_sender.py index 9e506c34..063ea156 100644 --- a/service/pixelated/adapter/services/mail_sender.py +++ b/service/pixelated/adapter/services/mail_sender.py @@ -24,6 +24,11 @@ from twisted.internet import reactor, defer from pixelated.support.functional import flatten from twisted.mail.smtp import User +from twisted.logger import Logger + + +logger = Logger() + class SMTPDownException(Exception): def __init__(self): @@ -68,8 +73,10 @@ class MailSender(object): deferreds = [] for recipient in recipients: + logger.info('_send_mail_to_all_recipients: Sending mail to recipient %s' % recipient) self._define_bcc_field(mail, recipient, bccs) smtp_recipient = self._create_twisted_smtp_recipient(recipient) + logger.info('_send_mail_to_all_recipients: Sending mail to smtp_recipient %s' % smtp_recipient) deferreds.append(outgoing_mail.send_message(mail.to_smtp_format(), smtp_recipient)) return defer.DeferredList(deferreds, fireOnOneErrback=False, consumeErrors=True) -- cgit v1.2.3