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 details)

Uploaded Source

File details

Details for the file djmailgun-0.0.1.tar.gz.

File metadata

  • Download URL: djmailgun-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for djmailgun-0.0.1.tar.gz
Algorithm Hash digest
SHA256 517e59fe97bf577b9bf325be434c3afa840a511ef366f79fc6712a9f3213631c
MD5 1fd2f661948cdf45e29efb6a115ec1f8
BLAKE2b-256 7f4fbad9df971134d9bf94ed4d531c4d67eae3627fbe418047df2fc2d049bc48

See more details on using hashes here.

Supported by

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