I’ve been trying to configure outbound mail on a self-hosted Discourse installation but so far no luck. Even with Namecheap support involved, we couldn’t get it working. Hoping someone here can point out what I’m missing.
Setup
Hosting: DigitalOcean droplet, Discourse installed via the official Docker method (/var/discourse).
Domain: Managed via Cloudflare (proxied A records for the site, DNS-only for MX/mail records).
Mail provider: Namecheap Private Email.
Discourse version: Latest tests-passed branch.
What works
I can receive email at my hello@domain.com inbox without issues.
MX, SPF, DKIM, and DMARC DNS records are set and validated.
Incoming mail via Gmail → hello@domain.com works.
What fails
Outgoing (activation emails, test emails from Discourse) never arrive.
Namecheap support confirmed my credentials and settings are correct, but couldn’t explain why it fails from the server.
Current app.yml config
DISCOURSE_SMTP_ADDRESS: mail dot privateemail dot com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: hello at domain dot com
DISCOURSE_SMTP_PASSWORD: “PASSWORD”
DISCOURSE_SMTP_ENABLE_START_TLS: true
DISCOURSE_SMTP_DOMAIN: domain dot com
DISCOURSE_NOTIFICATION_EMAIL: hello at domain dot com DISCOURSE_SMTP_AUTHENTICATION: login
Digital Ocean has replied and replied to their mail:
”We’d be happy to explore the possibility by having our Security team take a closer look at unblocking the SMTP ports for you. To help us better understand your needs and move forward with your request, could you please share the following details about your business requirements:
What type of emails will you be sending (e.g. transactional, newsletters, etc.)?
Are you planning on hosting your own email or utilizing a third-party sending service?
If possible, please provide context on your port requirements and if nonstandard ports or an API cannot be used.
Once we hear back from you, we will forward your request to the team with all the details provided.”
In that case, you should switch to using a transactional mail service like Mailgun (100 emails free per day) or Brevo (300 emails free per day). Then, you can switch to using port 2525 in your app.yml file, since that isn’t blocked.
We understand that you have an application requirement or a business need to enable port 25, 465 and 587. However due to our current policy we are unable to facilitate requests to remove the restriction on this port.
We recommend utilizing alternative ports if your application allows, such as port 2525. You can also use REST API with SendGrid, which allows you to send emails via HTTP requests instead of the traditional SMTP protocol if it is suitable for you or make use of another third-party sending service.
Please feel free to reach out to us if you have any additional queries. We’re always here for you!