I could reproduce the issue and solve it with
/opt/mattermost/bin/mattermost permissions reset
It seems to be an internal Mattermost error because there’s no error in maillog when sending a test mail from mattermost.
To be on the safe side, a DB backup is recommended.
See also Mattermost docs.
If you use custom schemes and permissions in your Mattermost installation you may have a look at permissions export/import.
Restart the service (don’t know if really needed but just to be sure):
systemctl restart mattermost
It may take some time because of cached data but finally sending mail should work again.
These settings should work.