summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-12-06 14:21:51 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-12-06 14:21:51 +0000
commit29c4a578af58f6da7c77830a0ff99260f2338d36 (patch)
tree0152eca76a6a0ee0ae69c8d82f7e4ea09662e724 /docs
parentb407de3bc56f2676bca214a302b1ea7d64b16d6b (diff)
Fixed #10863 -- Added HTML support to mail_managers() and mail_admins(), and used this to provide more and prettier detail in error emails. Thanks to boxed for the suggestion, and to Rob Hudson and Brodie Rao for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.3.txt6
-rw-r--r--docs/topics/email.txt10
2 files changed, 14 insertions, 2 deletions
diff --git a/docs/releases/1.3.txt b/docs/releases/1.3.txt
index 4e01fca972..79ab8b3f16 100644
--- a/docs/releases/1.3.txt
+++ b/docs/releases/1.3.txt
@@ -163,6 +163,12 @@ requests. These include:
* Support for _HTTPOnly cookies.
+ * mail_admins() and mail_managers() now support easily attaching
+ HTML content to messages.
+
+ * Error emails now include more of the detail and formatting of
+ the debug server error page.
+
.. _HTTPOnly: http://www.owasp.org/index.php/HTTPOnly
.. _backwards-incompatible-changes-1.3:
diff --git a/docs/topics/email.txt b/docs/topics/email.txt
index c5c848c67a..ad148a5a6f 100644
--- a/docs/topics/email.txt
+++ b/docs/topics/email.txt
@@ -109,7 +109,7 @@ a single connection for all of its messages. This makes
mail_admins()
=============
-.. function:: mail_admins(subject, message, fail_silently=False, connection=None)
+.. function:: mail_admins(subject, message, fail_silently=False, connection=None, html_message=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.
@@ -122,10 +122,16 @@ The "From:" header of the e-mail will be the value of the
This method exists for convenience and readability.
+.. versionchanged:: 1.3
+
+If ``html_message`` is provided, the resulting e-mail will be a
+multipart/alternative e-mail with ``message`` as the "text/plain"
+content type and ``html_message`` as the "text/html" content type.
+
mail_managers()
===============
-.. function:: mail_managers(subject, message, fail_silently=False, connection=None)
+.. function:: mail_managers(subject, message, fail_silently=False, connection=None, html_message=None)
``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`