Author: russellm
Date: 2009-01-29 17:40:57 -0600 (Thu, 29 Jan 2009)
New Revision: 9798
Modified:
django/branches/releases/1.0.X/
django/branches/releases/1.0.X/docs/topics/email.txt
Log:
[1.0.X] Fixed #8638 -- Added documentation on how to redirect email to a dummy
server for testing purposes. Thanks to Rob Hudson and Marc Fargas for their
work on the draft for this change.
Merge of r9793 from trunk.
Property changes on: django/branches/releases/1.0.X
___________________________________________________________________
Name: svnmerge-integrated
-
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9783,9789-9790,9794-9795
+
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9783,9789-9790,9793-9795
Modified: django/branches/releases/1.0.X/docs/topics/email.txt
===================================================================
--- django/branches/releases/1.0.X/docs/topics/email.txt 2009-01-29
23:37:58 UTC (rev 9797)
+++ django/branches/releases/1.0.X/docs/topics/email.txt 2009-01-29
23:40:57 UTC (rev 9798)
@@ -350,3 +350,29 @@
connection = SMTPConnection() # Use default settings for connection
messages = get_notification_email()
connection.send_messages(messages)
+
+Testing e-mail sending
+----------------------
+
+The are times when you do not want Django to send e-mails at all. For example,
+while developing a website, you probably don't want to send out thousands of
+e-mails -- but you may want to validate that e-mails will be sent to the right
+people under the right conditions, and that those e-mails will contain the
+correct content.
+
+The easiest way to test your project's use of e-mail is to use a "dumb" e-mail
+server that receives the e-mails locally and displays them to the terminal,
+but does not actually send anything. Python has a built-in way to accomplish
+this with a single command::
+
+ python -m smtpd -n -c DebuggingServer localhost:1025
+
+This command will start a simple SMTP server listening on port 1025 of
+localhost. This server simply prints to standard output all email headers and
+the email body. You then only need to set the :setting:`EMAIL_HOST` and
+:setting:`EMAIL_PORT` accordingly, and you are set.
+
+For more entailed testing and processing of e-mails locally, see the Python
+documentation on the `SMTP Server`_.
+
+.. _SMTP Server: http://docs.python.org/library/smtpd.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---