How to set up the SMTP settings?

I am having a hard time setting up the smtp settings to send emails. I tried using this article for help:
troubleshoot-email-on-a-new-discourse-install/16326
(sorry i can’t post the link)
But still can’t figure it out. Here is my setup.
I have a domain, domain1.com. Discourse is running on a subdomain (cname):
hub.domain1.com
I have a separate email service at domain2.com, and it’s smtp address is:
mail.domain2.com
All the email setup is fine as far as dkim spf etc. I can use that email no problem.

I am using the official normal setup instructions for discourse, but I can’t use the setup script because i don’t have port 80 and 443 available. There is a reverse proxy routing everything, including this subdomain. SO I have to manually adjust the app.yml file and do the rebuild script. No problem. I just can’t get emails to work.
If you can just advise on the email settings, that would help thanks. This is what I have

DISCOURSE_DEVELOPER_EMAILS: 'admin@domain2.com'
DISCOURSE_SMTP_ADDRESS: mail.domain2.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: admin@domain2.com
DISCOURSE_SMTP_PASSWORD: somepassword

Nobody here can tell you what your mail settings are because we don’t administer your mail server.

What port do you need to submit mail on? If it’s the default (25) you can leave it blank.

Does it require authentication? If so, put in the required credentials. If not, leave them blank.

If you don’t know how to set up your own SMTP email server, I strongly recommend using an existing SMTP service. This is especially true for a community just starting out, as it saves a significant amount of time and money.

I already have my own email server (or rather a service I am using with another hoster, not the one I am hosting this on), and I am using the same settings that works on all other services I have tried. I just can’t get it to work on this one. I think I am not setting up these parameters correctly.

Take Discourse out of the equation.

Does connecting to the mail server work from the server itself?

2 Likes