mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 11:51:05 -05:00
Clean up global MANDRILL_SETTINGS
* Clean up Djrill backend __init__ * Fold MANDRILL_SUBACCOUNT into global_settings logic * Add some missing override tests * Update docs
This commit is contained in:
@@ -103,24 +103,17 @@ Some notes and limitations:
|
||||
Mandrill-Specific Options
|
||||
-------------------------
|
||||
|
||||
.. setting:: MANDRILL_SETTINGS
|
||||
|
||||
Most of the options from the Mandrill
|
||||
`messages/send API <https://mandrillapp.com/api/docs/messages.html#method=send>`_
|
||||
`message` struct can be set directly on an :class:`~django.core.mail.EmailMessage`
|
||||
(or subclass) object:
|
||||
|
||||
Most of these options can be globally set in your project's :file:`settings.py`
|
||||
using :setting:`MANDRILL_SETTINGS`. For Example::
|
||||
|
||||
MANDRILL_SETTINGS = {
|
||||
'tracking_domain': 'example.com',
|
||||
'track_opens': True,
|
||||
}
|
||||
(or subclass) object.
|
||||
|
||||
.. note::
|
||||
``merge_vars`` and ``recipient_metadata`` cannot be set globally. ``global_merge_vars`` is merged
|
||||
(see :attribute:`global_merge_vars`)
|
||||
|
||||
You can set global defaults for common options with the
|
||||
:setting:`MANDRILL_SETTINGS` setting, to avoid having to
|
||||
set them on every message.
|
||||
|
||||
|
||||
.. These attributes are in the same order as they appear in the Mandrill API docs...
|
||||
|
||||
@@ -215,10 +208,6 @@ using :setting:`MANDRILL_SETTINGS`. For Example::
|
||||
Merge data must be strings or other JSON-serializable types.
|
||||
(See :ref:`formatting-merge-data` for details.)
|
||||
|
||||
.. note::
|
||||
|
||||
If using :setting:`MANDRILL_SETTINGS` then the message ``dict`` will be merged and overwrite any duplicates.
|
||||
|
||||
.. attribute:: merge_vars
|
||||
|
||||
``dict``: per-recipient merge variables (most useful with :ref:`mandrill-templates`). The keys
|
||||
@@ -244,8 +233,6 @@ using :setting:`MANDRILL_SETTINGS`. For Example::
|
||||
.. attribute:: subaccount
|
||||
|
||||
``str``: the ID of one of your subaccounts to use for sending this message.
|
||||
(The subaccount on an individual message will override any global
|
||||
:setting:`MANDRILL_SUBACCOUNT` setting.)
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
|
||||
Reference in New Issue
Block a user