Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Changeset 9793: SMTP testing documentation. I didn’t know this trick: running “python -m smtpd -n -c DebuggingServer localhost:1025” will start up a simple SMTP server which dumps received e-mails to the terminal instead of forwarding them on.

Tagged , , , ,

3 comments

  1. Excellent find! I'll have to remember this (bookmarked).

    Thanks!

    Josh - 29th January 2009 19:21 - #

  2. I saw the original feature request on the Django 1.1 list and researched and wrote a blog post on it here:
    http://rob.cogit8.org/blog/2008/Nov/20/testing-ema ils-django/

    We were considering a new management command or new options to runserver but ultimately decided this was so simple that documentation was all it needed.

    There's other fun stuff one can do with by subclassing Python's smptd server.

    Rob Hudson - 30th January 2009 00:36 - #

  3. This is very good to know.

    It would be extremely useful if the Django debug server was able to launch an instance of this, triggered off a settings.py field like:

    SMTP_USE_DEBUG_SERVER = True

    Daniel - 30th January 2009 02:19 - #

Sign in with OpenID

Auto-HTML: Line breaks are preserved; URLs will be converted in to links.

Manual XHTML: Enter your own, valid XHTML. Allowed tags are a, p, blockquote, ul, ol, li, dl, dt, dd, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, br, pre

A django site