Ticket #14783: email-doc-fixes.diff

File email-doc-fixes.diff, 3.5 KB (added by Adam Vandenberg, 14 years ago)
  • docs/topics/email.txt

    diff --git a/docs/topics/email.txt b/docs/topics/email.txt
    index 46bb85e..c5c848c 100644
    a b set, are used to authenticate to the SMTP server, and the  
    3939send_mail()
    4040===========
    4141
    42 The simplest way to send e-mail is using the function
    43 ``django.core.mail.send_mail()``. Here's its definition:
     42.. function:: send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None, connection=None)
    4443
    45     .. function:: send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None, connection=None)
     44The simplest way to send e-mail is using
     45``django.core.mail.send_mail()``.
    4646
    4747The ``subject``, ``message``, ``from_email`` and ``recipient_list`` parameters
    4848are required.
    are required.  
    5858      possible exceptions, all of which are subclasses of ``SMTPException``.
    5959    * ``auth_user``: The optional username to use to authenticate to the SMTP
    6060      server. If this isn't provided, Django will use the value of the
    61       ``EMAIL_HOST_USER`` setting.
     61      :setting:`EMAIL_HOST_USER` setting.
    6262    * ``auth_password``: The optional password to use to authenticate to the
    6363      SMTP server. If this isn't provided, Django will use the value of the
    64       ``EMAIL_HOST_PASSWORD`` setting.
     64      :setting:`EMAIL_HOST_PASSWORD` setting.
    6565    * ``connection``: The optional e-mail backend to use to send the mail.
    6666      If unspecified, an instance of the default backend will be used.
    6767      See the documentation on :ref:`E-mail backends <topic-email-backends>`
    are required.  
    7272send_mass_mail()
    7373================
    7474
    75 ``django.core.mail.send_mass_mail()`` is intended to handle mass e-mailing.
    76 Here's the definition:
     75.. function:: send_mass_mail(datatuple, fail_silently=False, auth_user=None, auth_password=None, connection=None)
    7776
    78     .. function:: send_mass_mail(datatuple, fail_silently=False, auth_user=None, auth_password=None, connection=None)
     77``django.core.mail.send_mass_mail()`` is intended to handle mass e-mailing.
    7978
    8079``datatuple`` is a tuple in which each element is in this format::
    8180
    a single connection for all of its messages. This makes  
    110109mail_admins()
    111110=============
    112111
    113 ``django.core.mail.mail_admins()`` is a shortcut for sending an e-mail to the
    114 site admins, as defined in the :setting:`ADMINS` setting. Here's the definition:
     112.. function:: mail_admins(subject, message, fail_silently=False, connection=None)
    115113
    116     .. function:: mail_admins(subject, message, fail_silently=False, connection=None)
     114``django.core.mail.mail_admins()`` is a shortcut for sending an e-mail to the
     115site admins, as defined in the :setting:`ADMINS` setting.
    117116
    118117``mail_admins()`` prefixes the subject with the value of the
    119118:setting:`EMAIL_SUBJECT_PREFIX` setting, which is ``"[Django] "`` by default.
    The "From:" header of the e-mail will be the value of the  
    123122
    124123This method exists for convenience and readability.
    125124
    126 mail_managers() function
    127 ========================
     125mail_managers()
     126===============
     127
     128.. function:: mail_managers(subject, message, fail_silently=False, connection=None)
    128129
    129130``django.core.mail.mail_managers()`` is just like ``mail_admins()``, except it
    130131sends an e-mail to the site managers, as defined in the :setting:`MANAGERS`
    131 setting. Here's the definition:
    132 
    133     .. function:: mail_managers(subject, message, fail_silently=False, connection=None)
     132setting.
    134133
    135134Examples
    136135========
Back to Top