From bbca9ab12671c96a79a382cc3b289111607c113f Mon Sep 17 00:00:00 2001 From: medmunds Date: Tue, 25 Oct 2016 11:20:42 -0700 Subject: [PATCH] Docs: add tip on dynamically choosing backend Ref #31. [ci skip] --- docs/tips/multiple_backends.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/tips/multiple_backends.rst b/docs/tips/multiple_backends.rst index 9d24133..8c78167 100644 --- a/docs/tips/multiple_backends.rst +++ b/docs/tips/multiple_backends.rst @@ -47,3 +47,13 @@ and in the constructor for an (See the :class:`django.utils.log.AdminEmailHandler` docs for more information on Django's admin error logging.) + + +You could expand on this concept and create your own EmailBackend that +dynamically switches between other Anymail backends---based on properties of the +message, or other criteria you set. For example, `this gist`_ shows an EmailBackend +that checks ESPs' status-page APIs, and automatically falls back to a different ESP +when the first one isn't working. + +.. _this gist: + https://gist.github.com/tgehrs/58ae571b6db64225c317bf83c06ec312