Email doesn't work after fresh install

I have 2 Digitalocean droplets.

  1. contains:
  2. contains:

I verified both domains with my email provider. My app running on sends email as expected however, discourse app that is in doesn’t send any email and i cannot see any useful log info about email failure.

When I try to send test email I get; There was a problem sending the test email. Please double-check your mail settings, verify that your host is not blocking mail connections, and try again.

My mail settings are:

  DISCOURSE_SMTP_PASSWORD: xxdummypassword

I have tried everthing I have seen in this community, DO community and Stackoverflow. Even from the answers to the questions I asked there about this issue. Feeling frustrated now and wonder if it will ever work.

I decided to manually set up the admin through terminal, however, I cannot set any kind of email including user sign up, test email or anything else in discourse.

Any clue that could help?


I fixed it by setting the email in the database itself using the rails console

rails r "SiteSetting.notification_email = ''"

OMG!! Thank you sooo much for this! I think I installed (the 30 minute version) at least 25 times, tried every trick in the book to solve this email issue… not to mention any small change in the setting requires a rebuild. As much I love the interface and the UX and what not, boy o boy the installation is anything but a straightforward process. That one line of rails code solved my problem as well. So thanks for sharing that! 3 days of googling, going through this forum finally concludes!

1 Like

Kindly help! How to open rails console??? :slightly_smiling:

Open rails console for discource by this command ./launcher enter app

int the console do the following,

rails c

rails r “SiteSetting.notification_email = ‘’”

1 Like

Thank you so much for your quick reply! <3 I’ll just try that now!!! :slightly_smiling: Hope this works! You’re a live saver!

Do we have to use the double quotes? Like below

rails r “SiteSetting.notification_email = ‘’”

OR like

rails r SiteSetting.notification_email = ‘’

like this. rails r "SiteSetting.notification_email = ‘’ "

OKEH :relaxed: Thank you so much!

Brother it gives this error that method R was not found…

Any idea? Would be really great ful!

are you using the docker standalone installation?

1 Like

Brother I followed this default guide and installed it manually.

I have currently disabled emails.