oh my golly, did this ever work

This commit is contained in:
Andy McKay 2011-05-11 11:16:03 -07:00
Родитель 1e230661e5
Коммит 2ccc112b46
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -286,13 +286,12 @@ def mail_exception(data):
msg = MIMEText('%s\n\n%s' % (
'\n'.join(traceback.format_exception(*sys.exc_info())), data))
msg['Subject'] = '[Update] ERROR at /services/update'
msg['To'] = settings.ADMINS
msg['To'] = ','.join([a[1] for a in settings.ADMINS])
msg['From'] = settings.DEFAULT_FROM_EMAIL
conn = smtplib.SMTP(getattr(settings, 'EMAIL_HOST', 'localhost'),
getattr(settings, 'EMAIL_PORT', '25'))
conn.sendmail(settings.DEFAULT_FROM_EMAIL, settings.ADMINS,
msg.as_string())
conn.sendmail(settings.DEFAULT_FROM_EMAIL, msg['To'], msg.as_string())
conn.close()