From 235b68135172c473e022045931719f047cf3dc4a Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Tue, 28 Apr 2020 11:43:47 +0100 Subject: [PATCH] Doc'd send_email() behavior when from_email is None. --- django/core/mail/__init__.py | 1 + docs/topics/email.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/django/core/mail/__init__.py b/django/core/mail/__init__.py index d17058b0d4..f49cd07dce 100644 --- a/django/core/mail/__init__.py +++ b/django/core/mail/__init__.py @@ -42,6 +42,7 @@ def send_mail(subject, message, from_email, recipient_list, Easy wrapper for sending a single message to a recipient list. All members of the recipient list will see the other recipients in the 'To' field. + If from_email is None, use the DEFAULT_FROM_EMAIL setting. If auth_user is None, use the EMAIL_HOST_USER setting. If auth_password is None, use the EMAIL_HOST_PASSWORD setting. diff --git a/docs/topics/email.txt b/docs/topics/email.txt index ba8778daf8..46b1bb3ad5 100644 --- a/docs/topics/email.txt +++ b/docs/topics/email.txt @@ -51,7 +51,8 @@ are required. * ``subject``: A string. * ``message``: A string. -* ``from_email``: A string. +* ``from_email``: A string. If ``None``, Django will use the value of the + :setting:`DEFAULT_FROM_EMAIL` setting. * ``recipient_list``: A list of strings, each an email address. Each member of ``recipient_list`` will see the other recipients in the "To:" field of the email message.