-
-
Notifications
You must be signed in to change notification settings - Fork 216
feat: add mailcatcher docker image for development #46
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
Hi, I appreciate the PR and contribution but sorry no thanks. Rails has built in support for this using https://www.seancdavis.com/posts/preview-emails-in-rails/. It lets you preview any email in a browser without sending out an email. Did you encounter issues using this approach? |
Hi |
Fair enough, it looks like mailcatcher supports both a web UI and being able to see it in a real mail client. I'll leave this PR open because I do in general like the idea. Sometimes the Rails mail preview solution is troublesome because you want to see the mail from another user or something tied into a job firing off and you don't want to use a hard coded example. Let me think about this for a bit if you don't mind. |
No problem, I already use this version for my personal projects and I update it when necessary. At the moment I added storybook and web compoments to my project. https://viewcomponent.org/ |
In case anyone is curious, I have been using MailCatcher for about 6 months and it's really good. I ended up making a blog post and video about it here: https://nickjanetakis.com/blog/self-host-and-preview-emails-locally-with-mailcatcher-open-source I think it'll make its way into this project at some point. Thanks for introducing it to me ThomAille! |
What's about using letter_opener_web gem instead? The setup of
All new letters ever sent will be available on the dashboard at http://localhost:3000/letter_opener Emails data will be stored locally at UPD: mailpit can be considered as quite good alternative and it provides some nice features like email client compatibility stats. |
I mainly prefer it because it works with any tech stack. It's also decoupled from Rails which makes it a bit more compatible with your app. For example Letter Opener hasn't had a commit in 1.5+ years, if it stops working with the next version of Rails we'd have to wait for a patch. With MailCatcher it will work no matter what version of Rails you have. Also with Docker it becomes a service you can add to your Ultimately both do similar things, feel free to stick with Letter Opener if you prefer it. |
Added mailcatcher to allow developers to test sending and integrating emails in development