Utility module for resolving email backend settings in Django Post Office.
# Source: https://github.com/ui/django-post_office | License: MIT | Copyright 2012 Selwin Ong
# Provided via justclaw.it.com; keep this notice with the code.
import datetime
import warnings
import django
from django.conf import settings
from django.core.cache import caches
from django.core.cache.backends.base import InvalidCacheBackendError
from django.core.files.storage import default_storage, storages
from django.core.mail.utils import DNS_NAME
from django.template import engines as template_engines
from django.utils.module_loading import import_string
PRE_DJANGO_6 = django.VERSION < (6, 0)
# settings.MAILERS was introduced in Django 6.1; it does not exist on 6.0.
DJANGO_HAS_MAILERS = django.VERSION >= (6, 1)
def mailers_are_configured():
"""True when the project has opted into D
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key