E-mails are not able to be sent successfully if the user has signed up using an e-mail address at a domain different than the domain the Mattermost server is hosted on.
I’ve validated all server SMTP configurations, as well as e-mail notification settings using the same user and e-mail address for all settings. I am using the STARTTLS setting with the SMTP server auth credentials configured, as well as connecting over port TCP 587.
When I test the connection, I receive the e-mail that my SMTP settings are configured correctly. However I had found that users were unable to reset their password, as the e-mails could not be sent.
While troubleshooting using a user with a gmail address, I found this error:
err=Failed to close connection to SMTP server."
When testing using my own user (of the same domain that I’m using to host the server), a password reset e-mail is sent correctly.
For environmental info, I am hosting this on an Ubuntu server using mysql on the back end, the Mattermost front-end on the same server, and I have nginx (also on the same server) handling SSL offloading as well as an 80 --> 443 redirect.
Any help / ideas would be appreciated.
This issue is very likely related to your SMTP server – the server handling the email delivery process. Since the email cannot be delivered to users without the same domain as the SMTP Server, you could attempt any of these troubleshooting steps:
- Check your internet connection, and ensure that your SMTP Server is connected to the internet.
- Check your antivirus or firewall settings . Sometimes an outgoing mail server can conflict with the computer’s protection systems. So verify that your firewall or antivirus are not blocking it, setting up a proper exception rule.
I thought so as well, but I’m hosting this on the same provider that I was hosting a Rocket.Chat instance on, which was using the same SMTP server, with users from many different domains (actually, the same exact users that currently exist in my Mattermost instance).
The VM that is hosting this is a single instance in a VPC, with no local firewall, only a VPC firewall which allows the outbound traffic. As for the SMTP server I’m using smtp.zoho.com which is a public service, with my hosted e-mail solution that supports both SSL and TLS connections. I’ve even verified that I can reach smtp.zoho.com on both TCP 465 and TCP 587 (SSL and TLS ports, in that order) directly from this VM.
I’m really at a loss here, as every bit of information I’ve found about these problems appear to have fixed others issues with the same exact configurations I’m running, except mine is still not working - I’ve tried all possible different configurations I can, both in config.json and as environment variables, countless reboots and app restarts, all to no avail.
Since the SMTP server using Zoho can successfully send mails to the same domain e-mails, indicates that the Mattermost configuration is okay. The issue is still most likely with the Zoho mail server sending mails to different domains such as Gmail.
Can you look into this https://www.zoho.com/mail/help/zoho-smtp.html#alink8 and if the steps there doesn’t resolve the issue, open a ticket on Zoho support support (at) zohomail (dot) com with the details of your account, your email client, screenshots of the configuration, etc.