diff --git a/docs/topics/email.txt b/docs/topics/email.txt index b44ab35..275b854 100644 --- a/docs/topics/email.txt +++ b/docs/topics/email.txt @@ -350,3 +350,19 @@ send out, you could send this with:: connection = SMTPConnection() # Use default settings for connection messages = get_notification_email() connection.send_messages(messages) + +Preventing all e-mail sending +----------------------------- + +The are moments when you may want Django to not send any e-mail at all, i.e. +during development, the least intrusive way to do so is to use a "dumb" e-mail +server that won't send received mail anywhere. + +The batteries included in Python already let you do so in a single command:: + + python /path/to/python/lib/python2.5/smtpd.py -n -c DebuggingServer localhost:1025 + +By doing this you'd have a simple SMTP server listening on port 1025 which will +print to standard output any message received. You then only need to set the +:setting:`EMAIL_HOST` and :setting:`EMAIL_PORT` accordingly, and you are set. +