Skip to content

Commit bbca9ab

Browse files
committed
Docs: add tip on dynamically choosing backend
Ref #31. [ci skip]
1 parent 7248c34 commit bbca9ab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/tips/multiple_backends.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,13 @@ and in the constructor for an
4747

4848
(See the :class:`django.utils.log.AdminEmailHandler` docs for more information
4949
on Django's admin error logging.)
50+
51+
52+
You could expand on this concept and create your own EmailBackend that
53+
dynamically switches between other Anymail backends---based on properties of the
54+
message, or other criteria you set. For example, `this gist`_ shows an EmailBackend
55+
that checks ESPs' status-page APIs, and automatically falls back to a different ESP
56+
when the first one isn't working.
57+
58+
.. _this gist:
59+
https://gist.github.com/tgehrs/58ae571b6db64225c317bf83c06ec312

0 commit comments

Comments
 (0)