Mailgun: Add MAILGUN_SENDER_DOMAIN setting

Allow custom MAILGUN_SENDER_DOMAIN in Anymail
settings. (Replaces need to use global esp_extra.)

Improve docs to cover cases where this is needed.

(esp_extra sender_domain is still supported for
overriding individual messages.)

Fixes #26.
This commit is contained in:
medmunds
2016-08-03 14:19:35 -07:00
parent 3f94e6910c
commit fb21c0d25b
5 changed files with 58 additions and 26 deletions

View File

@@ -100,7 +100,9 @@ or SparkPost or any other supported ESP where you see "mailgun":
)
ANYMAIL = {
# (exact settings here depend on your ESP...)
"MAILGUN_API_KEY": "<your Mailgun key>",
"MAILGUN_SENDER_DOMAIN": 'mg.example.com', # your Mailgun domain, if needed
}
EMAIL_BACKEND = "anymail.backends.mailgun.MailgunBackend" # or sendgrid.SendGridBackend, or...
DEFAULT_FROM_EMAIL = "you@example.com" # if you don't already have this in settings