Skip to content

Instantly share code, notes, and snippets.

@Justintime50
Created January 23, 2020 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Justintime50/e68b5e1675e323cdf2b04073952b7c0f to your computer and use it in GitHub Desktop.
Save Justintime50/e68b5e1675e323cdf2b04073952b7c0f to your computer and use it in GitHub Desktop.
Have you ever needed to test mail functions for a project and didn't want to spam the real web? Use Mailcatcher!

Setup Mailcatcher on Docker

Have you ever needed to test mail functions for a project and didn't want to spam the real web? Use Mailcatcher!

Usage

docker run -d -p 1080:1080 -p 1025:1025 --name=mailcatcher -itd --network=mailcatcher sj26/mailcatcher

Using the above command will start Mailcatcher with a UI accessible at localhost:1080 and mail coming in on port 1025. Link your containers to Mailcatcher via networks and setup your mail server to send to mailcatcher:1025 and you'll be set.

@Justintime50
Copy link
Author

An alternative to Mailcatcher that is much more modern and requires no local setup is Mailtrap. I've personally switched to this instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment