16 ms·
MailCatcher runs a super simple SMTP server
- ozim 2y agoI use https://github.com/ChangemakerStudios/Papercut-SMTP https://github.com/ChangemakerStudios/Papercut-SMTP on windows.
- jweir 2y agoWe used to use MailCatcher, and it worked quite nicely, but then switched to Arm machines and it broke. So we are using Mailpit https://mailpit.axllent.org https://mailpit.axllent.org (which also nice, but more complicated to setup). Looks like MailCatcher fixed the Arm issue – maybe we will switch back.
- olex 2y agoWhat about Mailpit did you find complicated to setup? For us, the Docker image works out of the box, and about all the configuration needed is pointing the SMTP client that does the mail sending to localhost instead of the normal outgoing mail servers.
- jweir 2y agoOh nothing much: Mailpit is installed via a script and then we added a systemd unit vs 'gem install mailcatcher && mailcatcher'
- iruoy 2y agoA tool like this is very useful, but this one isn't being maintained anymore. MailHog isn't either. MailPit, MailCrab and smtp4dev are modern alternatives. https://github.com/axllent/mailpit https://github.com/axllent/mailpit https://github.com/tweedegolf/mailcrab https://github.com/tweedegolf/mailcrab https://github.com/rnwood/smtp4dev https://github.com/rnwood/smtp4dev
- masa331 2y agoI use Mailcatcher for almost ten years now and never had a problem with it. Maybe is doesn't need maintenance?
- gregoriol 2y agoSame for Mailhog
- iruoy 2y agoThere's no rush to move away from MailCatcher or MailHog, but if you're not using those solutions already I see no reason to use them over the maintained options.
- diggan 2y ago> I see no reason to use them over the maintained options Things that don't change over a longer time period can be more comfortable sometimes. Especially things you use often and build up a sort of "muscle memory" about.
- rnewme 2y agoYou ignored first part of that sentence.
- naniwaduni 2y ago"Not changing" has value in its own right.
- fiddlerwoaroof 2y agoYeah, people underestimate the value of “finished” software: in an ecosystem with lots of stable dependencies, there’s very little reason for useful software to change constantly.
- SoftTalker 2y agoWhat is the intended or typical use for something like this? Testing other applications that send email comes to mind, or am I missing some other uses?
- jayknight 2y agoThis exactly. You run it in your dev environment so that your application can send email and you can view it, without actually sending real emails (that might accidentally go out to real people if you aren't careful).
- asyx 2y agoYep. We use this locally as the default smtp server so we can see how our email templates render
- olex 2y agoWe heavily use it for end-to-end testing. The API is integrated into our Playwright tooling, so we run e2e tests that verify entire user flows including email "steps" - such as the new user registration flow ("Open landing page - click through to registration - fill out and submit form - find confirmation email in Mailpit - click link - log in with new user credentials").
- rietta 2y agoI use it with docker-compose.yml in Rails and Django applications to catch all emails coming out of a local development copy and be able to confirm they are sent as well as to troubleshoot the layout of those email templates.
- mooreds 2y agoI use it for testing and local development. We list it in our docs under 'other services'[0], where it is called out for local development. Because it has an API[1] you can use it for integration testing as well. Because it runs in docker, you can use it with any stack, not just ruby. I would not run it in a prod setting. 0: https://fusionauth.io/docs/get-started/download-and-install/docker#other-services https://fusionauth.io/docs/get-started/download-and-install/... 1: https://mailcatcher.me/#api https://mailcatcher.me/#api
- achairapart 2y agoThere is also Mailpit[0] in this space. Actively maintained, written in Go, runs from a single static binary, very low footprint. [0]: https://mailpit.axllent.org/ https://mailpit.axllent.org/
- jeppester 2y agoWe recently started using smtp4dev: https://github.com/rnwood/smtp4dev https://github.com/rnwood/smtp4dev I found it quickly after coming to the realization that a "mailtrap" for local development was very likely a solved problem. It took 15 minutes and 10 lines of code to add it to the current project's docker-compose-file and so far it's working great. I love how easy docker/podman makes it to set up such services.
- nonrandomstring 2y agoMaybe a good use for this is as a low cost final failover. Stick it on a random box as mx3 priority 100 and if everything else goes south at least you'll find all the emails eventually.
- hoistbypetard 2y agoI'd probably use something that's maintained for that... This isn't maintained, and back when I used to do penetration testing, attacking a backup mx was something we routinely did. Those mx records call hostile attention to the systems they point to.
- nonrandomstring 2y agoThat's a good point; the public records advertising a possible weak spot. What is a safe rast-resort mail catch-all?
- urda 2y agoReminds me of my days of building integrations against SendGrid, testing was always "fun".
- alsetmusic 2y agoI was just thinking how I’d like to have my NAS run scheduled scrubbing but wanted an email warning when it was upcoming to prevent unexpected performance issues. I don’t want my NAS reaching out to the internet except for OS updates and maybe packages to add functionality. I certainly don’t want to hook up one of my email accounts. A tool like this is perfect. I’ll check out the currently maintained projects listed in a sibling comment.
- rietta 2y agoThis is a development tool, not production. For it's intended use it is mature. There has been Git activity within the last year so I am not sure why that would be considered unmaintained by some. If something is important to someone in particular, they should implement a pull request or see the author's website about making a donation or paying for the development of a particular capability.
- doublerabbit 2y agoWho says it's not for production? Just because it's not actively developed doesn't mean it's always a development tool. Looks bug free and feature complete to which I would conclude is more production worthy than most.
- brandonaaron 2y agoRecently swapped from using the Gem version of this to the docker version on an older ruby on rails project as part or turning it into a devcontainer utilizing docker. Seemed to work well for local dev.
- Ocha 2y agoIf you are looking for hosted version, Mailsnag.com does it and more for pretty cheap (or free).
- nwgo 2y agoI don't understand. What are use cases for using this or Mailpit? Can't you just create a new email address on existing server and check it? Why do you need different setup and different infra?
- wkirby 2y agoThis is useful for non prod environments, especially local, where you don’t want some background job sending emails welcome to jdoe@gmail.com when you are testing the sign up flow. It allows you to safely send outbound emails to any address without worry that they will actually be delivered, without having to change your application code.
- hoistbypetard 2y agoLocal development of an app that will send email. For example, when I'm building a django app, running it via `runserver`, I don't want it to go to an external mail server. And using the console logger for SMTP gets really noisy. Being able to point my browser at Mailpit's web UI lets me see all the messages the app has sent. It's particularly nice for things like magic links and testing that email confirmations are working.
- jackthemuss 2y agoIf you want a hosted version MailSlurp works well
- p0w3n3d 2y agoI wonder what penetration testing would show in it. When there is web and rewrite to display there is a lot to do in terms of security
- pmontra 2y agoIt's a tool for catching emails sent from a local app under development. The developer sending those mails already has local access to the machine. If someone runs it exposed to the public internet... Oh wow, that could be interesting.
- dunham 2y agoMany years ago, I threw together something like this in Go (SMTP on one side, a web server on the other, boltdb underneath). We use it for automated tests that involve email notifications, invitations, etc. QA could hit the app and the mail server in the same automated browser.
- pak9rabid 2y agoOh man, MailCatcher is worth its weight in gold. Years ago I used to use this to verify mail coming out from a Rails webapp was doing what it was supposed to. It is extremely useful.
- msantos 2y agoFor a long time I used to use smtp-sink — http://www.postfix.org/smtp-sink.1.html http://www.postfix.org/smtp-sink.1.html $ smtp-sink -u nobody -R /tmp/smtp-sink -d "maildir/%Y-%m-%d/mail.%H.%M." 127.0.0.1:25 1024 Until I joined a team that didn’t find cli as fun and preferred GUI tools. And that’s when I found mailcatcher. It’s solid and just works.
- nickjj 2y agoThis is very useful, I use it with Docker Compose in my Flask course to handle sending email in development and tests in a way that doesn't require making an external network call or set anything up on my host. It's perfect for local development and the maintained Docker image supports amd64 and arm64 CPU architectures. An example of that is here: https://github.com/nickjj/build-a-saas-app-with-flask/blob/dfc5e4061d17bab949d6ea8a9e924dca77977a94/compose.yaml#L81 https://github.com/nickjj/build-a-saas-app-with-flask/blob/d...
- sj26 2y agoHiya! I'm the maintainer. It's true I don't do much to it these days. But that's because it's complete. There are lots of things I would love to do to improve it. But none of it would dramatically improve what it does. I fix things when they break. But if it ain't broke... Happy to answer any questions, or be persuaded that something is broken or would be a dramatic improvement :-)
- sj26 2y agoI actively endorse https://github.com/mailhog/MailHog https://github.com/mailhog/MailHog if you want something more Go-flavoured or operationalised. But it is also "complete."
- hk1337 2y agoMailcatcher works great for me. Glad to see you still keep up with bug fixes when needed. I normally just run it in a docker container configured in docker compose. I could do without the extra links giving credit in Mailhog, so I will stick with mailcatcher. I know you don't manage Mailhog but that's what will keep me with mailcatcher.
- zinxq 2y agoMailinator.com has a free version .. just use any inbox @mailinator.com and voila!
- ldthorne 2y agoDoes anyone know of a similar tool for catching SMS messages in local/development environment? My company uses mailtrap[0] in our development environments to give engineers and product managers a tool to preview emails that would otherwise be sent to users and we're looking for a similar tool for the SMS messages that we send via Twilio. I'd love to have a shared "inbox" per-development environment where PMs can see all the SMS messages that would have been sent (namely to whom the message was sent + the content of the SMS). Ideally it'd hook into whatever Twilio SDK your app is using to send messages (Python, in our case) to intercept calls and route them to the sandbox instead. It seems like Twilio played with this idea with the Twilio Dev Phone project[1] but that project doesn't seem to be actively maintained. [0] https://mailtrap.io https://mailtrap.io [1] https://github.com/twilio-labs/dev-phone https://github.com/twilio-labs/dev-phone
- yenoham 2y agoThis is what Mailosaur[0] offers - countries available depends on tiers though due to the number operating costs and associated regulations. [0] https://mailosaur.com https://mailosaur.com
- e12e 2y agoNot the same thing, bit VCR and variants can help with testing external api calls (see "ports to other languages"): https://github.com/vcr/vcr https://github.com/vcr/vcr
- latchkey 2y agoHeh, we started this one 15 years ago now... https://github.com/voodoodyne/subethasmtp https://github.com/voodoodyne/subethasmtp
- deleted 2y ago[deleted]
- T3RMINATED 2y ago[dead]
- elliotec 2y agoI've been using Mailcatcher for dev on a rails app that... well, sends mail sometimes. It has been so incredibly easy to use and run, and I can't imagine needing anything else than what it has. Thanks @sj26 and collaborators!