Need a Test SMTP Server?

I always feel bad when I blog something I've tweeted about, but then I remind myself that some folks have (wisely) avoided the trap that is Twitter addiction or may simply have missed it. Earlier this week I was doing some work for a client using Lucee (I'm trying to ween myself off ACF completely) and ran into an issue trying to read emails generated by the code. No matter what I tried, I couldn't find the temporary mail files generated by the back end code. I knew multiple different SMTP testing servers existed, but I hadn't installed one in a while. I did a quick Google and came across MailDev.

MailDev is a quick install via npm but obviously doesn't matter if you use Node, ColdFusion, or PHP for your back end. You simply install it and then type maildev in your Terminal/Command Prompt.

Maildev

Notice this gives you both a SMTP server and a web interface!

Maildev

And not just a web interface, a pretty snazzy one. As soon as mail shows up, it alerts you and auto updates. The reader is nice and simple.

Maildev

Note that the email being displayed there is a diagnostic one and kinda ugly. That's not MailDev's fault.

On top of being a simple SMTP test server, it can also relay email and be used within a Node.js application as well.

var MailDev = require('maildev');
 
var maildev = new MailDev();
 
maildev.listen();
 
maildev.on('new', function(email){
  // We got a new email! 
});

Anyway - I thought this was just darn tootin' nice and thought I'd share.

Archived Comments

Comment 1 by Phil posted on 8/10/2016 at 1:27 PM

Sweet, been looking for something like this for our testing servers across technologies

Comment 2 by askearly posted on 8/11/2016 at 4:43 PM

Very nice! That's one thing I've been trying to tackle for years.

Comment 3 by PatrickHeppler posted on 8/18/2016 at 10:27 AM

I'm using mailtrap.io to test email

Comment 4 by dbinott posted on 10/26/2016 at 12:47 PM
Comment 5 (In reply to #4) by Raymond Camden posted on 10/26/2016 at 1:15 PM

Looks cool, but Windows only?

Comment 6 (In reply to #5) by dbinott posted on 10/27/2016 at 1:15 PM

yup