Last active
November 18, 2015 13:00
-
-
Save docapotamus/21987a2137c42688ad6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if not app.debug: # pragma: no cover | |
import logging | |
from logging.handlers import SMTPHandler | |
mail_handler = SMTPHandler( | |
('smtp.mailgun.org', 25), | |
'[email protected]', | |
['[email protected]'], | |
'Application Error', | |
(USERNAME, PASSWORD) | |
) | |
mail_handler.setLevel(logging.INFO) | |
app.logger.addHandler(mail_handler) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment