Dienstag, 30. November 2010

Django Email send testing

Sometimes you want to test / debug Emails and dont want to send emails at all.

The smtp-lib provides an email-testserver, wich prints incomming email to stdout.


django-doc: link

You can start the smtp-debugserver with this command.
python -m smtpd -n -c DebuggingServer localhost:1025


in your settings.py you need to add the attributes:
EMAIL_HOST = "localhost"
EMAIL_PORT = 1025

now email you send via django will print out to stdout.

Keine Kommentare:

Kommentar veröffentlichen