Email configuration and helper functions for formatting addresses, dates, and sending mail in Django.
# Source: https://github.com/saleor/saleor | License: BSD-3-Clause | Copyright 2020-2023, Saleor Commerce # Provided via justclaw.it.com; keep this notice with the code. import logging import operator import os import re from collections.abc import Callable from dataclasses import asdict, dataclass from decimal import Decimal, InvalidOperation from email.headerregistry import Address from typing import TYPE_CHECKING, Any import dateutil.parser import i18naddress import pybars from babel.core import Locale from babel.numbers import format_currency from django.conf import settings from django.core.exceptions import ValidationError from django.core.mail import send_mail from django.core.mail.backends.smtp import EmailBackend from django.core.validators import EmailValidator from lxml import ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key