From: W. Trevor King Date: Thu, 18 Oct 2012 16:22:05 +0000 (-0400) Subject: rss2email: add debug logging for smtp_send() and sendmail_send(). X-Git-Tag: v3.0~72^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0f1f2e761a35ce241295d324f448679f9270ce02;p=rss2email.git rss2email: add debug logging for smtp_send() and sendmail_send(). --- diff --git a/rss2email.py b/rss2email.py index cd9fb71..20f2dc1 100755 --- a/rss2email.py +++ b/rss2email.py @@ -468,6 +468,7 @@ def smtp_send(sender, recipient, message, config=None, section='DEFAULT'): if config is None: config = CONFIG server = CONFIG.get(section, 'smtp-server') + LOG.debug('sending message to {} via {}'.format(recipient, server)) ssl = CONFIG.getboolean(section, 'smtp-ssl') if ssl: smtp = _smtplib.SMTP_SSL() @@ -497,6 +498,8 @@ def smtp_send(sender, recipient, message, config=None, section='DEFAULT'): def sendmail_send(sender, recipient, message, config=None, section='DEFAULT'): if config is None: config = CONFIG + LOG.debug( + 'sending message to {} via /usr/sbin/sendmail'.format(recipient)) try: p = _subprocess.Popen( ['/usr/sbin/sendmail', recipient],