Setup email for development?

I’m currently setting up my discourse and am currently still using the development version as I still want to create some plugins. Now, I want to setup my email for the forum but do not know how I can do that in the development version. Where can I set my SMTP settings in a development version?

1 Like

You don’t need to setup SMTP credentials in development. Discourse is automatically configured to use mailcatcher. Just launch mailcatcher and open the web UI. It will show all the emails sent by discourse :wink:

6 Likes

Do I need to use mailcatcher? I would prefer to send out mails via SMTP to see how things would work once I switch to the regular non-development version. Is that not possible in development?

You’ll want to setup some sort of staging environment for that. It isn’t a bad idea to have anyway, if you’ve got custom plugins, because you’ll probably want to test all updates in a production-like environment to make sure you don’t let the smoke out before you take new changes (to Discourse itself, or your plugins) live, juuuuust in case.

6 Likes

I am running discourse locally within a docker container, but when I attempt to send a test email via “email address to test” field in admin settings (from the READ ME FIRST Admin Quick Start Guide), I never receive an email even though it says it was successful. I have mailcatcher running and see this in the mailcatcher logs “SMTP: Received message from ‘noreply@unconfigured.discourse.org’ (6578 bytes)”. I also see that the message was sent in the rails logs. Any idea why the email is never actually delivered? (I did check junk folder)

For anyone coming here in the future for the same reason as I did. The Mailcatcher UI by default is http://127.0.0.1:1080/

Edit:
Also important that sidekiq is running otherwise the only email that will work is the email delivery test
bundle exec sidekiq

4 Likes