Readit News logoReadit News
mustardo · 3 years ago
andrei_says_ · 3 years ago
I’ve used mailcatcher for years and love it. It is perfect.
olex · 3 years ago
Same, I'm using it in CI/CD for full E2E tests of web apps in combination with Playwright for app interaction, and it's awesome. Same test flow can nicely simulate user interactions and verify that emails with the correct content go out from the backend, all in seconds within a normal Gitlab CI test job.

May take a look at Mailpit though. It has the advantage of having a native Docker image build, whereas for Mailcatcher I'm using a third-party Alpine-based image.

mbork_pl · 3 years ago
venkatkms · 3 years ago
Per mailpit author mailhog is not actively developed and has performance issues. Hence developed this alternative
jayknight · 3 years ago
I've been using https://github.com/maildev/maildev, and it has worked fine for me.
synchrone · 3 years ago
smtp4dev https://github.com/rnwood/smtp4dev - works well in docker, has api, can selectively forward to a real smtp
minimaul · 3 years ago
Really recommend this, it's very useful to us at work for capturing email from local dev environments for email testing - we run it as part of our dockerised dev setup. Means we don't have to worry about ever accidentally hitting real mail systems, while still letting us actually exercise our email sending code.

Also makes it very easy to see rendered HTML, HTML source, the text/plain part of a mailer, etc.

And as an excellent plus, the author is responsive to reasonable PRs!

moltar · 3 years ago
I’ve been using Ethereal [1] for ages. It works great and has an API. Also totally free.

Downside:

- it’s hosted, which may not be for everyone if your test emails contain sensitive information. Altho I think it never should.

- it sometimes is down

- it requires an internet connection

[1] https://ethereal.email/

LinuxBender · 3 years ago
This looks very useful. In the past I've used smtp-sink which is part of Postfix-(stone) and logs to syslog but having a web interface that shows attachments is a big improvement over the smtp-sink method. I could see also using this to replace my SMTP tarpits which are just Postfix logging to single text files per node. I could envision a few other unorthodox uses for this as well.

With an optional installation step this could run on port 25 as a regular person. Or authbind [1]

    setcap cap_net_bind_service=+ep /path/to/mailpit
[1] - https://stackoverflow.com/questions/413807/is-there-a-way-fo...

npteljes · 3 years ago
I have used FakeSMTP a long time ago, and it seems like it's still around. This one comes as a single jar.

http://nilhcem.com/FakeSMTP/

jslakro · 3 years ago
I find mailtrap.io really handful, how anybody would prefer this option? genuine question
shagie · 3 years ago
My work machine is prohibited from connecting to port 25 outside of the accepted work systems. When on VPN, I can't even connect to port 25 within the local networks.

    docker run -d --name=mailpit --restart unless-stopped -p 8025:8025 -p 1025:1025 axllent/mailpit
I can connect to port 1025 just fine.

---

This test data isn't something that should be leaving the local network either.

Can you run mailtrap.io on your local machine or in your data center?

---

Oops, I accidentally set it to send all the emails. How much does it cost to handle 500 email in the next few minutes? Mailpit is free.

---

That 500 test email that were sent to mailpit, they're correct and should be sent out to the testers.

https://github.com/axllent/mailpit/wiki/SMTP-relay

What is the cost to forward 500 emails this week? And again next week?

---

Mailpit (and its predecessor Mailhog) were not difficult at all to spin up and test. Any developer with docker running on their machine can do local testing without any issues. Data never leaves the machine or intranet - this makes security types sweat less.

francislavoie · 3 years ago
I prefer mailtrap because I can show others what mails I produce in testing looks like in their browser. Also nice for staging environments that aren't local dev environments. Zero infrastructure setup. But yeah it depends on your business needs.
brightball · 3 years ago
Fwiw, I use mailtrap.io for non-prod environments outside of my local machine. Locally, this is a better option when other people don’t need access to it.
jawngee · 3 years ago
mailtrap has a send limit on the free plan.
cebert · 3 years ago
At work we use AWS’s Simple Email Service to dump all emails to S3 buckets that expire after a few days. It’s nice if you need to very that emails are working correctly in end-to-end tests.
moltar · 3 years ago
2Gkashmiri · 3 years ago
is there some foss email inbound software that can take email "in" using wildcards or restricted email ids and dumps the same into a DB?

i have to apply regex to the email body and other stuff and keep only the relevant bit .

i see the managed softwares but i want something on my own vps.