Skip to content

Commit

Permalink
Merge pull request heroku-python#24 from tedmiston/master
Browse files Browse the repository at this point in the history
added support for Postmark mail service
  • Loading branch information
singingwolfboy committed Jun 2, 2014
2 parents ae0b538 + 05b8df5 commit 7111721
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions flask_heroku.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 7111721

Please sign in to comment.