I have installed Discourse successfully on Free Oracle Cloud. Currently, I am in the finalized step where I need to verify the email address that I used during installation process.
I want to use my cPanel email that I created to send emails through Discourse app. I ran
./discourse-doctor
and the error was
======================================== ERROR ========================================
SMTP SERVER NOT FOUND
getaddrinfo: Name or service not known
====================================== SOLUTION =======================================
The most likely problem is that the host name of your SMTP server is incorrect.
Check it and try again.
I ensured SMTP server credentials, which all were correct.
Does this type of email from cPanel supports sending emails through Discourse?
Appreciate your response. I’ll keep them, however each time I restart the service a window error pops up saying ‘can’t restart nginx’. Is that notification normal?
Yes, I made changes on it. Now there is another error:
nginx: [emerg] invalid port in "%ip%:%web_ssl_port%" of the "listen" directive in /etc/nginx/nginx.conf:165
nginx: configuration file /etc/nginx/nginx.conf test failed
Just bought a professional email package from networksloution.com and I put the credentials and port number of SMTP correctly in app.yml. Still when I issue this commend:
./launcher rebuild app
it throws the same error, which is SMTP NOT Found? I made thousands of check for the information I put in the app. Do you mean Oracal block outgoing traffic for SMTP even if the port is different? They want me to upgrade the account, right?
Many thanks @Raphael. I’ve followed your advice and used the port 587 as it’s set by email provider I bought pro email from. Here are the settings from the app.yml with of course changing the actual credentials.
## Required. Discourse will not work with a bare IP number.
DISCOURSE_HOSTNAME: talk.tiptopcomputers.shop # I am using subdomain for Discourse.
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example '[email protected],[email protected]'
DISCOURSE_DEVELOPER_EMAILS: '[email protected]'
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: smtp.XXXXXXXXXXXX
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: [email protected]
DISCOURSE_SMTP_PASSWORD: "6372hudshas65" # Fake Password just for example
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
DISCOURSE_SMTP_DOMAIN: tiptopcomputers.shop
DISCOURSE_NOTIFICATION_EMAIL: [email protected]
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: [email protected]
I can tell you that I double check the credentials many times, but no luck. The error is:
======================================== ERROR ========================================
SMTP SERVER NOT FOUND
getaddrinfo: Name or service not known
====================================== SOLUTION =======================================
The most likely problem is that the host name of your SMTP server is incorrect.
Check it and try again.
=======================================================================================
I followed the Email troubleshooting guide published by the discourse team, but still the error persists. for some reason, I suspect if the email domain is incorrect since the host name is subdomain whereas the email domain contains root domain, so I ran the commend below after uncomment it and changed the value to the actual email for one time:
#- exec: rails r "SiteSetting.notification_email='[email protected]'"
Then rebuild the app
./launcher rebuild app
The error drives me crazy because I clearly followed the instruction, nothing happens as expected! However, I have a doubt if the error comes from the discrepancy between the host name and the email domain. Does discourse require email domain that is similar to root domain? Am I missing something in my work? Thank you for your time…
Update: I finally managed to fully install Discourse it was the DNS records that weren’t inputted
properly.
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example '[email protected],[email protected]'
DISCOURSE_DEVELOPER_EMAILS: '[email protected]'
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: mail.hestiacp.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: [email protected]
DISCOURSE_SMTP_PASSWORD: PutPasswordHere
DISCOURSE_SMTP_AUTHENTICATION: login
DISCOURSE_SMTP_ENABLE_START_TLS: true
DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none
Which is working properly, more I can’t help - maybe you’ll find more help at the discourse support forum.