diff --git a/config/environment.rb b/config/environment.rb index ce160dc5e17..516a139c3a8 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -8,5 +8,5 @@ Discourse::Application.initialize! # When in "dev" mode, ensure we won't be sending any emails if Rails.env.development? && ActionMailer::Base.smtp_settings != { address: "localhost", port: 1025 } - fail "In development mode, you should be using mailcatcher otherwise you might end up sending thousands of digest emails" + fail "In development mode, you should be using mailhog otherwise you might end up sending thousands of digest emails" end diff --git a/config/environments/development.rb b/config/environments/development.rb index 7e58350de6d..bb6b7a913f0 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -42,7 +42,7 @@ Discourse::Application.configure do config.handlebars.precompile = true - # we recommend you use mailcatcher https://github.com/sj26/mailcatcher + # we recommend you use mailhog https://github.com/mailhog/MailHog config.action_mailer.smtp_settings = { address: "localhost", port: 1025 } config.action_mailer.raise_delivery_errors = true diff --git a/config/environments/profile.rb b/config/environments/profile.rb index d09ddcd1b36..66baaaa2ec6 100644 --- a/config/environments/profile.rb +++ b/config/environments/profile.rb @@ -29,7 +29,7 @@ Discourse::Application.configure do # Specifies the header that your server uses for sending files config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - # we recommend you use mailcatcher https://github.com/sj26/mailcatcher + # we recommend you use mailhog https://github.com/mailhog/MailHog config.action_mailer.smtp_settings = { address: "localhost", port: 1025 } # Send deprecation notices to registered listeners diff --git a/docs/DEVELOPER-ADVANCED.md b/docs/DEVELOPER-ADVANCED.md index 95f0295f4e2..6ad004b1aa3 100644 --- a/docs/DEVELOPER-ADVANCED.md +++ b/docs/DEVELOPER-ADVANCED.md @@ -24,7 +24,7 @@ To get your Ubuntu 16.04 or 18.04 LTS install up and running to develop Discours rvm install 2.6.2 rvm --default use 2.6.2 # If this error out check https://rvm.io/integration/gnome-terminal - gem install bundler mailcatcher rake + gem install bundler rake # Download and install postgresql-10 from https://wiki.postgresql.org/wiki/Apt @@ -75,9 +75,12 @@ If you ever need to recreate your database: bundle exec rake admin:create RAILS_ENV=test bundle exec rake db:drop db:create db:migrate +Configure emails via MailHog (https://github.com/mailhog/MailHog): + + docker run -p 8025:8025 -p 1025:1025 mailhog/mailhog # open http://localhost:8025 to see the emails + Discourse does a lot of stuff async, so it's better to run sidekiq even on development mode: - mailcatcher # open http://localhost:1080 to see the emails, stop with pkill -f mailcatcher bundle exec sidekiq # open http://localhost:3000/sidekiq to see queues bundle exec rails server diff --git a/docs/DEVELOPMENT-OSX-NATIVE.md b/docs/DEVELOPMENT-OSX-NATIVE.md index 1c56df4524f..c8a0d51b9e3 100644 --- a/docs/DEVELOPMENT-OSX-NATIVE.md +++ b/docs/DEVELOPMENT-OSX-NATIVE.md @@ -216,7 +216,7 @@ By default, development.rb will attempt to connect locally to send email. config.action_mailer.smtp_settings = { address: "localhost", port: 1025 } ``` -Set up [MailCatcher](https://github.com/sj26/mailcatcher) so the app can intercept +Set up [MailHog](https://github.com/mailhog/MailHog) so the app can intercept outbound email and you can verify what is being sent. ## Additional Image Tooling diff --git a/docs/TESTING.md b/docs/TESTING.md index 667873c02e4..fc56522998d 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -2,9 +2,9 @@ Some notes about testing Discourse: -## MailCatcher +## MailHog -Discourse depends heavily on (sending) email for notifications. We use [MailCatcher](https://mailcatcher.me/) +Discourse depends heavily on (sending) email for notifications. We use [MailHog](https://github.com/mailhog/MailHog) to test emails. It's super convenient! -> MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. Run mailcatcher, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:1080 to see the mail that's arrived so far. +> MailHog runs a super simple SMTP server which catches any message sent to it to display in a web interface. Run mailhog, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:8025 to see the mail that's arrived so far.