Email configuration

Note

For now the project includes only Mailgun and Sendgrid configuration. Feel free to contribute definitions for other providers.

Mailgun add-on

Retrieves Mailgun add-on settings from the environment and defines the following variables in the herokuify.mail.mailgun module:

  • MAILGUN_API_KEY
  • MAILGUN_SMTP_SERVER
  • MAILGUN_SMTP_LOGIN
  • MAILGUN_SMTP_PASSWORD
  • MAILGUN_SMTP_PORT

as well as EMAIL_* settings for use in Django config:

  • EMAIL_HOST
  • EMAIL_HOST_USER
  • EMAIL_HOST_PASSWORD
  • EMAIL_PORT

Django config

Import settings from this module into your Django project settings:

from herokuify.mail.mailgun import EMAIL_HOST, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD, EMAIL_PORT

Installing add-on

Use heroku addons command to subscribe for Mailgun add-on:

heroku addons:add mailgun:<PLAN>

Quick start with:

heroku addons:add mailgun:starter

Sendgrid add-on

Retrieves Sendgrid add-on settings from the environment and defines the following variables in the herokuify.mail.sendgrid module:

  • SENDGRID_SMTP_SERVER
  • SENDGRID_USERNAME
  • SENDGRID_PASSWORD
  • SENDGRID_SMTP_PORT

as well as EMAIL_* settings for use in Django config:

  • EMAIL_HOST
  • EMAIL_HOST_USER
  • EMAIL_HOST_PASSWORD
  • EMAIL_PORT
  • EMAIL_USE_TLS

Django config

Import settings from this module into your Django project settings:

from herokuify.mail.sendgrid import EMAIL_HOST, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD, EMAIL_PORT, EMAIL_USE_TLS

Installing add-on

See Sendgrid add-on page. Quick start with:

heroku addons:add sendgrid:starter

Defined module attributes

Mailgun

Sendgrid

Table Of Contents

Previous topic

Cache

Next topic

Amazon AWS settings

Python Development

Django web development for startups and businesses.

Quality Python development and scientific applications.

Quick links

Edit this document

The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.