Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #13471 -- Added example of send_mass_mail usage. Thanks to gtay…

…lor for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0e6ff67ba248df3aed5025b593b86b8c80766011 1 parent 9338ad0
Russell Keith-Magee authored

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  docs/topics/email.txt
8  docs/topics/email.txt
@@ -91,6 +91,14 @@ As in :meth:`~django.core.mail.send_mail()`, recipients in the same
91 91
 ``recipient_list`` will all see the other addresses in the e-mail messages'
92 92
 "To:" field.
93 93
 
  94
+For example, the following code would send two different messages to
  95
+two different sets of recipients; however, only one connection to the
  96
+mail server would be opened::
  97
+
  98
+    message1 = ('Subject here', 'Here is the message', 'from@example.com, ['first@example.com', 'other@example.com'])
  99
+    message2 = ('Another Subject', 'Here is another message', 'from@example.com', ['second@test.com'])
  100
+    send_mass_mail((message1, message2), fail_silently=False)
  101
+
94 102
 send_mass_mail() vs. send_mail()
95 103
 --------------------------------
96 104
 

0 notes on commit 0e6ff67

Please sign in to comment.
Something went wrong with that request. Please try again.