mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Docs: note SERVER_EMAIL setting default won't work with most ESPs
mail_admins, mail_managers, and similar Django error reporting generally won't work with the default SERVER_EMAIL setting root@localhost.
This commit is contained in:
@@ -100,6 +100,7 @@ or SparkPost or any other supported ESP where you see "mailgun":
|
|||||||
}
|
}
|
||||||
EMAIL_BACKEND = "anymail.backends.mailgun.EmailBackend" # or sendgrid.EmailBackend, or...
|
EMAIL_BACKEND = "anymail.backends.mailgun.EmailBackend" # or sendgrid.EmailBackend, or...
|
||||||
DEFAULT_FROM_EMAIL = "you@example.com" # if you don't already have this in settings
|
DEFAULT_FROM_EMAIL = "you@example.com" # if you don't already have this in settings
|
||||||
|
SERVER_EMAIL = "your-server@example.com" # ditto (default from-email for Django errors)
|
||||||
|
|
||||||
|
|
||||||
3. Now the regular `Django email functions <https://docs.djangoproject.com/en/stable/topics/email/>`_
|
3. Now the regular `Django email functions <https://docs.djangoproject.com/en/stable/topics/email/>`_
|
||||||
|
|||||||
@@ -68,9 +68,10 @@ planning to *receive* email.)
|
|||||||
use :ref:`multiple Anymail backends <multiple-backends>` to send particular
|
use :ref:`multiple Anymail backends <multiple-backends>` to send particular
|
||||||
messages through different ESPs.)
|
messages through different ESPs.)
|
||||||
|
|
||||||
2. If you don't already have a :setting:`DEFAULT_FROM_EMAIL` in your settings,
|
2. If you don't already have :setting:`DEFAULT_FROM_EMAIL` and :setting:`SERVER_EMAIL`
|
||||||
this is a good time to add one. (Django's default is "webmaster\@localhost",
|
in your settings, this is a good time to add them. (Django's defaults are
|
||||||
which some ESPs will reject.)
|
"webmaster\@localhost" and "root\@localhost", respectively, and most ESPs won't
|
||||||
|
allow sending from those addresses.)
|
||||||
|
|
||||||
With the settings above, you are ready to send outgoing email through your ESP.
|
With the settings above, you are ready to send outgoing email through your ESP.
|
||||||
If you also want to enable status tracking or inbound handling, continue with the
|
If you also want to enable status tracking or inbound handling, continue with the
|
||||||
|
|||||||
Reference in New Issue
Block a user