From 05b8df560d9e0af6531aeab3ef321b3b49e8a261 Mon Sep 17 00:00:00 2001 From: Taylor Edmiston Date: Tue, 6 May 2014 21:47:29 -0400 Subject: [PATCH] added Postmark mail service env vars --- flask_heroku.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/flask_heroku.py b/flask_heroku.py index 20d122b..392ea2f 100644 --- a/flask_heroku.py +++ b/flask_heroku.py @@ -54,6 +54,15 @@ def init_app(self, app): app.config.setdefault('MAIL_USERNAME', environ.get('SENDGRID_USERNAME')) app.config.setdefault('MAIL_PASSWORD', environ.get('SENDGRID_PASSWORD')) app.config.setdefault('MAIL_USE_TLS', True) + # Postmark + elif 'POSTMARK_SMTP_SERVER' in environ: + app.config.setdefault('SMTP_SERVER', 'POSTMARK_SMTP_SERVER') + app.config.setdefault('SMTP_LOGIN', environ.get('POSTMARK_API_KEY')) + app.config.setdefault('SMTP_PASSWORD', environ.get('POSTMARK_API_KEY')) + app.config.setdefault('MAIL_SERVER', 'POSTMARK_SMTP_SERVER') + app.config.setdefault('MAIL_USERNAME', environ.get('POSTMARK_API_KEY')) + app.config.setdefault('MAIL_PASSWORD', environ.get('POSTMARK_API_KEY')) + app.config.setdefault('MAIL_USE_TLS', True) # Redis To Go redis_url = environ.get('REDISTOGO_URL')