Skip to content

Commit

Permalink
Merge pull request #891 from philborman/master
Browse files Browse the repository at this point in the history
Fix broken email notifier
  • Loading branch information
philborman authored Jun 30, 2017
2 parents 582f7e3 + c3387ed commit abf2bd8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lazylibrarian/notifiers/email_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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:
Expand Down

0 comments on commit abf2bd8

Please sign in to comment.