Don't get registration mail, but smtp server works fine

AI-generated summary

IMSth is unable to receive registration emails in Discourse despite confirming their Elastic Email SMTP credentials work via a Node app and discourse-doctor reporting successful SMTP connection. Logs show emails are being sent, but Elastic Email’s sent counter remains at 0, suggesting no actual SMTP connection occurs. Corsterix first suggests checking the spam folder and notes that emails sent from forum.domain.com instead of domain.com can trigger spam filters — a fix that worked for them. IMSth confirms spam folder checks and notes the absence of any sent record in Elastic Email, reinforcing the suspicion that Discourse isn’t truly connecting. Corsterix then asks if the DISCOURSE_SMTP_PORT in app.yml is correctly configured and inquires about the protocol setting in Elastic Email — to which IMSth responds with confusion and reports success using Mailjet. IMSth follows up asking how to fix the domain mismatch, referencing the SiteSetting.notification_email setting. Finally, IMSth resolves the issue: their OVH server was blocking ports 25 and 2525, and switching to port 587 in the SMTP configuration fixed everything. The key takeaway is that even if discourse-doctor reports success, actual email delivery can fail due to port blocking or misconfiguration — and port 587 often works reliably with Elastic Email.

Hi

I would like to install Discource but I have one BIG problem. I didn’t receive a registration email.
I use Elastic Email as an SMTP provider. I check connection (use node application) - credentials are ok and I can send an email.

I’ve checked on two different servers (one on OVH, on my machine - Debians) - both don’t work.
No logs with email.

discource-doctor said that SMTP server connection successful.
In cat shared/standalone/log/rails/production.log I can see Sent mail to MY_EMAIL_ACCOUNT@gmail.com (439.1ms)

telnet smtp.elasticemail.com 2525 says Connected to smtp.elasticemail.com.

Any ideas ?

Did you check your spam folder?

When I first set up Discourse on one of my sites it went to spam because the email was coming from forum.domain.com instead of domain.com, once I fixed that the emails came through fine.

Yes, I’ve checked spam folder.
The most weird thing is that in Elastic Mail I can’t see, that EM sent message. Sent messages counter is 0 . So Discource didn’t connect to SMTP server, so it could not send a message.

I just noticed your telnet to 2525, did you configure app.yml correctly?

DISCOURSE_SMTP_PORT:

Also, what’s your protocol set to in Elastic Mail?

What does it mean protocol set to in Elastic Mail?

I’ve checked Mailjet - I’ve got message :astonished:

@Corsterix How do you resolve wrong domain ? Uncomment - exec: rails r "SiteSetting.notification_email='noreply@DOMAINl'" ?

I found a solution !

I have server on OVH, which probably block 25 and 2525 port. And another related with SMTP.

When I choose port on 587 everything works !