Skip to main content

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.

  1. You could just add this in settings file

    MAILGUN_ACCESS_KEY  = 'ACCESS-KEY'
    MAILGUN_SERVER_NAME = 'SERVER-NAME'
  2. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djmailgun-0.0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page