Dummy SMTP server for development purposes

there is a nice trick with python: http://muffinresearch.co.uk/archives/2010/10/15/fake-smtp-server-with-python/

Just one liner can do the job (listens on port 2500):

python -m smtpd -n -c DebuggingServer localhost:2500

Disclaimer - I work for the company behind this service linked to below.

You can also use a hosted email testing service like Mailosaur. Some of them (ours included) come with an API for integrating into your tests.

That way if you hit a problem you've got someone else to do the hard work in adding new features, etc. for you.