Ticket #8638: 8638.diff

File 8638.diff, 1.0 KB (added by telenieko, 6 years ago)

Remember English is not my native language ;)

  • docs/topics/email.txt

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