A few days ago, I was working on a Sitecore project utilizing Sitecore Web Forms for Marketers (WFFM) that leveraged the “Send Email Message” save action. I wanted to test sending email without having to change the “to” address to my own or a co-worker’s email (I have annoyed co-workers in the past with this!). After some research, I found a great little tool to help me accomplish this: smtp4dev.
This stand-alone application listens to a port of your choice (default: 25) and intercepts (i.e. doesn’t deliver) the emails sent from your machine, perfect for testing WFFM.
Features
- No installation – single-file, stand-alone executable.
- View emails directly in Outlook (or other) email client.
- Easily view email header and body source.
- Sits in notification area when minimized.
- When app is visible or behind other windows, the taskbar icon blinks when a new email is received – very fast response when testing or debugging.
- Easy to turn capture on and off.
- No need to configure a mail server.
- Works offline/locally.
- Not limited to WFFM, Sitecore, .Net, etc.
Simple Demo with WFFM
- For this demo I created a clean Sitecore 6.6 demo site and installed WFFM.
- I added a form to my sitecore homepage:
- I set the save action in my form to “Send Email Message”, and set it up to send to bill.gates@microsoft.com (to demonstrate how smtp4dev intercepts and doesn’t actually deliver to the destination email address)
- Then I set up my WFFM email settings:
Item: /sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Send Email Message“Parameters” field (under submit):
localhostyour.email@example.comtrue
- I submitted my test form and smtp4dev intercepted the email:
Then a double click opens it right up in Outlook(!):
- If you click the inspect button on a given email, you can view the email source, including MIME parts too:
Thats it! Tweet me @SteveStriga or leave a comment below. I look forward to chatting with you. Cheers!