A simple drop-in mail backend for Django
Project description
Package for sending emails via mailgun. (This package based on django-mailgun package)
Currently tested only on Python 3
Overview
djmailgun is a drop-in mail backend for Django, per https://docs.djangoproject.com/en/1.8/topics/email/#email-backends
Installation
Install django-mailgun:
pip install django-mailgun
Configuration
Depends on version you would like to use:
1) EMAIL_BACKEND = 'djmailgun.backends.v1.Backend' 2) EMAIL_BACKEND = 'djmailgun.backends.v2.Backend' 3) EMAIL_BACKEND = 'djmailgun.backends.v3.Backend'
Next you have to setup access key and server name and there are two ways of doing this.
You could just add this in settings file
MAILGUN_ACCESS_KEY = 'ACCESS-KEY' MAILGUN_SERVER_NAME = 'SERVER-NAME'
You could migrate all package migrations via
./manage.py migrate djmailgun
Next you have to setup this table for example via admin part of the site. You have to add two records:
- 1 First
key - MAILGUN_ACCESS_KEY
value - ACCESS-KEY
- 2 Second
key - MAILGUN_SERVER_NAME
value - SERVER-NAME
Now, when you use django.core.mail.send_mail, Mailgun will send the messages
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.