Login

Tag "debuggingserver"

Snippet List

One line SMTP sink server

Start simple SMTP server on localhost:25 and print to standard output all email headers and the email body. Useful for debugging outgoing mail without configuring SMTP daemon in development enviroment.

  • email
  • debug
  • smtp
  • mail
  • debugging
  • debuggingserver
Read More

Better debugging mail server

Python includes (and [Django recommends](http://docs.djangoproject.com/en/dev/topics/email/?from=olddocs#testing-e-mail-sending)) a simple email debugging server which prints mail to stdout. The trouble is, unlike any half-competent mail reader, long lines are broken up, and thus long URLs don't work without modification. This snippet simply unwraps long lines (broken by "=") so long URLs can be easily copied/pasted from the terminal. Save this snippet into a file named "better.py" and execute it.

  • mail
  • debuggingserver
  • long-lines
Read More

2 snippets posted so far.