Fixed #14783 - Links + style improvements to docs/topics/email.txt. Thanks adamv for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Timo Graham 2010-11-27 12:19:21 +00:00
parent 0be14b0b96
commit 750325505e
1 changed files with 15 additions and 16 deletions

View File

@ -39,10 +39,10 @@ set, are used to authenticate to the SMTP server, and the
send_mail() send_mail()
=========== ===========
The simplest way to send e-mail is using the function .. function:: send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None, connection=None)
``django.core.mail.send_mail()``. Here's its definition:
.. function:: send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None, connection=None) The simplest way to send e-mail is using
``django.core.mail.send_mail()``.
The ``subject``, ``message``, ``from_email`` and ``recipient_list`` parameters The ``subject``, ``message``, ``from_email`` and ``recipient_list`` parameters
are required. are required.
@ -58,10 +58,10 @@ are required.
possible exceptions, all of which are subclasses of ``SMTPException``. possible exceptions, all of which are subclasses of ``SMTPException``.
* ``auth_user``: The optional username to use to authenticate to the SMTP * ``auth_user``: The optional username to use to authenticate to the SMTP
server. If this isn't provided, Django will use the value of the server. If this isn't provided, Django will use the value of the
``EMAIL_HOST_USER`` setting. :setting:`EMAIL_HOST_USER` setting.
* ``auth_password``: The optional password to use to authenticate to the * ``auth_password``: The optional password to use to authenticate to the
SMTP server. If this isn't provided, Django will use the value of the SMTP server. If this isn't provided, Django will use the value of the
``EMAIL_HOST_PASSWORD`` setting. :setting:`EMAIL_HOST_PASSWORD` setting.
* ``connection``: The optional e-mail backend to use to send the mail. * ``connection``: The optional e-mail backend to use to send the mail.
If unspecified, an instance of the default backend will be used. If unspecified, an instance of the default backend will be used.
See the documentation on :ref:`E-mail backends <topic-email-backends>` See the documentation on :ref:`E-mail backends <topic-email-backends>`
@ -72,10 +72,9 @@ are required.
send_mass_mail() send_mass_mail()
================ ================
``django.core.mail.send_mass_mail()`` is intended to handle mass e-mailing. .. function:: send_mass_mail(datatuple, fail_silently=False, auth_user=None, auth_password=None, connection=None)
Here's the definition:
.. function:: send_mass_mail(datatuple, fail_silently=False, auth_user=None, auth_password=None, connection=None) ``django.core.mail.send_mass_mail()`` is intended to handle mass e-mailing.
``datatuple`` is a tuple in which each element is in this format:: ``datatuple`` is a tuple in which each element is in this format::
@ -110,10 +109,10 @@ a single connection for all of its messages. This makes
mail_admins() mail_admins()
============= =============
``django.core.mail.mail_admins()`` is a shortcut for sending an e-mail to the .. function:: mail_admins(subject, message, fail_silently=False, connection=None)
site admins, as defined in the :setting:`ADMINS` setting. Here's the definition:
.. function:: mail_admins(subject, message, fail_silently=False, connection=None) ``django.core.mail.mail_admins()`` is a shortcut for sending an e-mail to the
site admins, as defined in the :setting:`ADMINS` setting.
``mail_admins()`` prefixes the subject with the value of the ``mail_admins()`` prefixes the subject with the value of the
:setting:`EMAIL_SUBJECT_PREFIX` setting, which is ``"[Django] "`` by default. :setting:`EMAIL_SUBJECT_PREFIX` setting, which is ``"[Django] "`` by default.
@ -123,14 +122,14 @@ The "From:" header of the e-mail will be the value of the
This method exists for convenience and readability. This method exists for convenience and readability.
mail_managers() function mail_managers()
======================== ===============
.. function:: mail_managers(subject, message, fail_silently=False, connection=None)
``django.core.mail.mail_managers()`` is just like ``mail_admins()``, except it ``django.core.mail.mail_managers()`` is just like ``mail_admins()``, except it
sends an e-mail to the site managers, as defined in the :setting:`MANAGERS` sends an e-mail to the site managers, as defined in the :setting:`MANAGERS`
setting. Here's the definition: setting.
.. function:: mail_managers(subject, message, fail_silently=False, connection=None)
Examples Examples
======== ========