HOWTO: Test email sending functionality without actually sending emails

sugarcrmdevelopers —  October 6, 2011 — 1 Comment

One problem that those developing web applications run into is testing of email functionality without actually sending out emails, which would confuse users and most likely contain incorrect information. While one way around this is to create a dummy email account to send out emails, this can be complicated to do if you have hardcoded emails in logic hooks or other scripts that you would need to change as well. This is where a fake SMTP agent can come in handy, where it will intercept all the emails being sent and do whatever you wish with them ( such as log them to a text file for example ). All you need to do is feed your application the SMTP settings for the dummy agent, and then configure and start the agent and you are ready to go. This helps tremendously with testing, both for manual and automated testing.

We at Sugar are big fans of fakemail for this, and use this extensively in our testing and operations team. But there are many other tools as well that are used by our technical folks. Here’s a list of some of them:

On Windows exclusively:

Multiplatform:

Online only:

Other solutions is available but it’s mostly command line version only of require a bit a coding (Java, Python or .NET)

Let us know in the comments what tools you use here and any feedback you may have on them.

One response to HOWTO: Test email sending functionality without actually sending emails

  1. 

    Awesome tip ! Very informative. Thank you very much for posting!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s