DigitalOcean + Siteground Email won't work

Hey everyone, I’m new here and new to working with the server side of things.

I’m 4.5 hours into DigitalOcean’s ‘One-click’ Discourse install. So much for 1 click. Everything works fine but emails NEVER send. I’ve destroyed my droplet and started over 2 times. I’ve adjusted app.xml info and rebuilt several times. Email and Password are definitely correct. I’ve sought out Siteground’s support and they say all DNS records are properly configured, and I have SPF and DKIM properly configured. I’ve tried Siteground’s suggested port 465, port 25, and port 2525, rebuilding each time.

From what I can tell, I currently have no Firewall setup in DO, so I don’t think it’s DO blocking email connections, but I’ve created a ticket with them just in case.

But nothing. I get no email from creating an admin user, and when I sign in and try to send a test email I ALWAYS get the same error:

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.

Here is the log:

root@DRD-Forum:/var/discourse# tail shared/standalone/log/rails/production.log
Completed 200 OK in 150ms (Views: 0.4ms | ActiveRecord: 1.3ms)
Started GET "/admin/email.json?_=1551222026511" for at 2019-02-26 23:00:37 +0000
Processing by Admin::EmailController#index as JSON
  Parameters: {"_"=>"1551222026511"}
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 1.3ms)
Started POST "/admin/email/test" for at 2019-02-26 23:00:44 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>""}
Sent mail to (877.1ms)
Completed 422 Unprocessable Entity in 956ms (Views: 0.4ms | ActiveRecord: 7.2ms)

Is it because my forum is at the subdomain (, while my admin and system email is on the main domain (

Didn’t expect the setup to be so easy and then to beat my head against the wall for hours trying to get a single lousy email to send. Any help is appreciated.


Yes. There is a line near the bottom of the app.yml the will let you change the notification email address.


Hey Jay, thanks for your response!

I can change the notification email address in the ‘Settings’ within my Discourse Admin account as well, I assume this is the same?

So it would have to be something like This seems strange given that the 30-min install guide states that you have to:

  • Select a subdomain such as or or for your Discourse instance.

  • Add an email address for admin account(s) and provides these examples (which don’t use subdomains) [,]

I can give it a try but it is a bit of a hassle and given the above documentation it’s a little hard to believe that this is my problem and not something to do with firewalls, etc. (which I’m also troubleshooting with DO).

Any thoughts?

The notification email address that you chose must be one that your mail server will accept and deliver mail for. The default is noreply@your.discourse.domain, but can be anything at all. The key is that your mail server is configured to use that address.

1 Like

My mail server is configured to send and receive from both and, and I have tested it outside of Discourse. I tried to setup the smtp email ass and the admin email as, but when I test inside discourse I get the following error:

Testing sending to a********* using****************
======================================== ERROR ========================================
                                    UNEXPECTED ERROR


====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!

Please report the exact error message above to
(And a solution, if you find one!)

Well, that’s not quite true. This is a common error. Digital Ocean is blocking whatever port your mail server is on. Mail services like Mailgun accept SMTP traffic on port 2525, so when I do an install I always use port 2525. If you don’t have that option, you’ll need to contact Digital Ocean and ask them to not block that port.

As mentioned above, I tried port 2525, rebuilt, and still no luck. DO claimed that ports 24, 465, and 587 were blocked/filtered, but said it wasn’t on their end and suggested I edit iptables -nvL. I don’t really understand iptables -nvL, and I tried my best. No change. So I just went off on DO in an email requesting again that they unblock those ports. We’ll see if they help at all.

Their ‘1-click’ Discourse install has been a nightmare. SSH key didn’t work (permissions denied) and when I went to edit permissions through their consul I was asked for a password (which they never sent me because I was using an SSH key I had uploaded to my DO account)! I ended up destroying that droplet and starting over following the 30-min guide on Git. But problem persists. I don’t understand why DO would default to blocking SMTP ports on a ‘1-click’ Discourse install when Discourse can’t function without an outgoing SMTP email. That seems soooooo stupid to me. Anyways… done with my rant.

Appreciate you taking the time. Adam

How have you tested it? Can you reach port 465 on from a shell on the droplet?

You should follow or have me do it.

To check if you can access the port you

telnet hostname port

This is crucial if we’re going to help you. We can’t support the 1-click install here, you would need to work with DigitalOcean if you wanted to continue to use that.

1 Like