Jump to content

SMTP for dev. Is there something awesome I don't know about?


Recommended Posts

For a long time I've been logging emails to the filesystem on dev so that I can make sure they look right. I actually log them as HTML files, which is cool because I can open them up in a browser and see the display. Only thing is, I can't open any attachments, and see if the attachments were good.

 

So, then I found FakeSMTP, which is a little java program, and it listens for emails and stores them as .eml files. I can look at the .eml files and get an idea if things were good, but still can't open the attachments.

 

So I'm wondering what others are doing. It would be awesome if there was a way to send emails out and have a program listening that put them in Thunderbird, so I could actually see the HTML and open the attachments. I don't use Thunderbird for normal email, so it could just be dedicated to dev if that matters.

 

What do you do? How do you do it?

I mostly work from home, and ISP blocks outbound email servers.

 

I did find a decent solution though. Thunderbird has a .eml import add-on, so after I've "sent" some emails to fakeSMTP, I can just import them in Thunderbird. The downside is that Thunderbird expects an actual email account, so I had to link up to one of my gmail accounts.

Edited by sKunKbad

Either of these:

 

https://github.com/mailhog/MailHog

http://mailcatcher.me/

 

Super easy to install and configure, and it provides a web interface on an alternate HTTP port for viewing mail. You can send mail to any email address and they will be captured in one big list in the web interface.

 

I've used a couple different solutions over the years, including Postfix setups with Squirrelmail or some other web client, but this is far, far better.

Either of these:

 

https://github.com/mailhog/MailHog

http://mailcatcher.me/

 

Super easy to install and configure, and it provides a web interface on an alternate HTTP port for viewing mail. You can send mail to any email address and they will be captured in one big list in the web interface.

 

I've used a couple different solutions over the years, including Postfix setups with Squirrelmail or some other web client, but this is far, far better.

 

What I found out the hard way was that by using fake SMTP that I did not see SMTP related errors, and thereby did not have adequate error handling. In your experience, can MailHog or mailcatcher be set up so that it will throw actual errors for testing purposes?

It's not "fake SMTP", it is a real SMTP server. It's just not designed to deliver mail to real recipients.

 

I'm not sure what you mean by SMTP related errors. If you mean logging errors via email, then yeah it'll work for that, as long as the error handler uses the correct address/port for mailhog/mailcatcher.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.