summaryrefslogtreecommitdiff
path: root/docs/email.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-03-22 19:47:15 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-03-22 19:47:15 +0000
commitfe24eca81aee4c75365101430940d2fbb5979bc6 (patch)
tree06f7be1394241008b6a1e012f82232e80437c7d3 /docs/email.txt
parente67f1a680d8780b52c2a1020c37b51c5455b0d4b (diff)
Fixed #1529 -- Added support for authenticated SMTP to django.core.mail. Thanks, Bruce Kroeze
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/email.txt')
-rw-r--r--docs/email.txt22
1 files changed, 17 insertions, 5 deletions
diff --git a/docs/email.txt b/docs/email.txt
index c39fbbd114..8159536d1e 100644
--- a/docs/email.txt
+++ b/docs/email.txt
@@ -26,10 +26,12 @@ The send_mail function
The simplest way to send e-mail is using the function
``django.core.mail.send_mail``. Here's its definition::
- send_mail(subject, message, from_email, recipient_list, fail_silently=False)
+ send_mail(subject, message, from_email, recipient_list,
+ fail_silently=False, auth_user=EMAIL_HOST_USER,
+ auth_password=EMAIL_HOST_PASSWORD)
-All parameters are required except for ``fail_silently``, which is ``False`` by
-default.
+The ``subject``, ``message``, ``from_email`` and ``recipient_list`` parameters
+are required.
* ``subject``: A string.
* ``message``: A string.
@@ -40,6 +42,13 @@ default.
* ``fail_silently``: A boolean. If it's ``False``, ``send_mail`` will raise
an ``smtplib.SMTPException``. See the `smtplib docs`_ for a list of
possible exceptions, all of which are subclasses of ``SMTPException``.
+ * ``auth_user``: **New in Django development version.** The optional
+ username to use to authenticate to the SMTP server. If this isn't
+ provided, Django will use the value of the ``EMAIL_HOST_USER`` setting.
+ * ``auth_password``: **New in Django development version.** The optional
+ password to use to authenticate to the SMTP server. If this isn't
+ provided, Django will use the value of the ``EMAIL_HOST_PASSWORD``
+ setting.
.. _smtplib docs: http://www.python.org/doc/current/lib/module-smtplib.html
@@ -49,13 +58,16 @@ The send_mass_mail function
``django.core.mail.send_mass_mail`` is intended to handle mass e-mailing.
Here's the definition::
- send_mass_mail(datatuple, fail_silently=False):
+ send_mass_mail(datatuple, fail_silently=False,
+ auth_user=EMAIL_HOST_USER, auth_password=EMAIL_HOST_PASSWORD):
``datatuple`` is a tuple in which each element is in this format::
(subject, message, from_email, recipient_list)
-``fail_silently`` has the same function as in ``send_mail()``.
+``fail_silently``, ``auth_user`` and ``auth_password`` have the same functions
+as in ``send_mail()``. Note that ``auth_user`` and ``auth_password`` are only
+available in the Django development version.
Each separate element of ``datatuple`` results in a separate e-mail message.
As in ``send_mail()``, recipients in the same ``recipient_list`` will all see