Debugging email sending in your Web application is always tricky as you need a working SMTP and you also need to watch out that you don’t accidently spam real users (if you’re working on a local copy of real database).
There is a neat one liner that acts as a “sink smtpd” server, meaning that it implements SMTP protocol, so you app can communicate with it, while printing everything it receives on screen:
sudo /usr/lib/python2.6/smtpd.py -n -c DebuggingServer localhost:25