From c3387ed1db24d979f03395b6626cd288abe5d39a Mon Sep 17 00:00:00 2001 From: Phil Borman Date: Fri, 30 Jun 2017 17:07:43 +0200 Subject: [PATCH] Fix broken email notifier --- lazylibrarian/notifiers/email_notify.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lazylibrarian/notifiers/email_notify.py b/lazylibrarian/notifiers/email_notify.py index 3d1395d71..d60d12ba4 100644 --- a/lazylibrarian/notifiers/email_notify.py +++ b/lazylibrarian/notifiers/email_notify.py @@ -40,12 +40,6 @@ def _notify(message, event, force=False, files=None): subject = event text = message - logger.debug('Email notification: %s' % message['Subject']) - logger.debug('Email from: %s' % message['From']) - logger.debug('Email to: %s' % message['To']) - logger.debug('Email text: %s' % text) - logger.debug('Files: %s' % files) - if files: message = MIMEMultipart() message.attach(MIMEText(text)) @@ -57,6 +51,12 @@ def _notify(message, event, force=False, files=None): message['To'] = lazylibrarian.CONFIG['EMAIL_TO'] message['Date'] = formatdate(localtime=True) + logger.debug('Email notification: %s' % message['Subject']) + logger.debug('Email from: %s' % message['From']) + logger.debug('Email to: %s' % message['To']) + logger.debug('Email text: %s' % text) + logger.debug('Files: %s' % files) + if files: for f in files: if os.path.getsize(f) > 20000000: