signal email sending success

pull/5/head
nathaniel smith 2017-01-21 00:34:17 -08:00
parent cecc9deeb4
commit 1a111be0d5
1 changed files with 5 additions and 1 deletions

View File

@ -21,8 +21,12 @@ def send_email(to, body, subject='a message from tilde.town', frum=FROM,):
} }
) )
if response.status_code != 200: success = response.status_code == 200
if not success:
logger.error('{}: failed to send email "{}" to {}'.format( logger.error('{}: failed to send email "{}" to {}'.format(
response.status_code, response.status_code,
subject, subject,
to)) to))
return success