sKunKbad Posted December 12, 2015 Share Posted December 12, 2015 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? Quote Link to comment https://forums.phpfreaks.com/topic/299707-smtp-for-dev-is-there-something-awesome-i-dont-know-about/ Share on other sites More sharing options...
requinix Posted December 12, 2015 Share Posted December 12, 2015 I just email them to myself. For real. An actual email account. Is there a particular reason you aren't doing that? Quote Link to comment https://forums.phpfreaks.com/topic/299707-smtp-for-dev-is-there-something-awesome-i-dont-know-about/#findComment-1527848 Share on other sites More sharing options...
sKunKbad Posted December 12, 2015 Author Share Posted December 12, 2015 (edited) 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 December 12, 2015 by sKunKbad Quote Link to comment https://forums.phpfreaks.com/topic/299707-smtp-for-dev-is-there-something-awesome-i-dont-know-about/#findComment-1527851 Share on other sites More sharing options...
scootstah Posted December 18, 2015 Share Posted December 18, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/299707-smtp-for-dev-is-there-something-awesome-i-dont-know-about/#findComment-1528164 Share on other sites More sharing options...
sKunKbad Posted December 19, 2015 Author Share Posted December 19, 2015 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? Quote Link to comment https://forums.phpfreaks.com/topic/299707-smtp-for-dev-is-there-something-awesome-i-dont-know-about/#findComment-1528233 Share on other sites More sharing options...
scootstah Posted December 21, 2015 Share Posted December 21, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/299707-smtp-for-dev-is-there-something-awesome-i-dont-know-about/#findComment-1528338 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.