The discussion revolves around an issue with the latest version of Discourse not sending emails over SMTP. malee reported the problem, but after conducting tests, including setting up SMTP with Brevo on a Digital Ocean VM, they concluded that the issue was not with Discourse itself.
malee suspected that the request to the external SMTP service was being blocked by an anti-SPAM mechanism on their Azure tenant. pfaffman suggested that the issue might be related to firewall blocking, and recommended trying a different port, such as 2525.
After conducting further tests, malee discovered that the issue was actually DNS-related. They were able to resolve the problem, and email sending is now working correctly.
I seem to be having a problem with Discourse sending emails over SMTP.
I have verified my hostname with my Email Service Provider and have successfully sent emails with Telnet and via sendmail via the host VM as well as via Telnet within the Discourse Docker container.
I had a look at integrating ‘sendmail’ within the Docker container and received a ‘host name could not be resolved’ error when emailing directly from the CLI.
To me this means that there are no issues with communication between the VM and the SMTP service provider.
I have tried all the usual SMTP ports and I believe that the configuration in the app.yml file is correct. The VM is Linux 20.04, 24.04 and 22.04 have been used in tests also.
Check your email service provider’s limits. Sometimes the sending fails when the quota is reached. Try sending an e-mail from Outlook. It happened to me once. Your problem may be different, but it may still be useful to someone.
Thanks for the responses. I has a look over the weekend. I created a VM on Digital Ocean and set up SMTP with Brevo. Everything was okay.
So nothing wrong with Discourse.
I figure Discourse uses a Ruby GEM such as NET::smtp to mail and that by default there is no smtp server installed within the container. The issue we are facing is on an Azure tenant.
To me it feels like the request to the external SMTP service i.e. being blocked somewhere. By some kind of anti-SPAM mechanism sitting on top of the tenant.
I have a few more tests to carry out to narrow this down.
Any info on how Discourse facilitates email sending would be great I am a bit of a newcomer to Ruby on the Rails.