Skip to content

Commit

Permalink
Fix broken email notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
philborman committed Jun 30, 2017
1 parent a5d54b8 commit c3387ed
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 c3387ed

Please sign in to comment.