☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
Port 465 is reserved for SMTPS, and the connection should start encrypted directly. So, I think that if the UseTLS option is enabled and the port is 465, the function tls.Dial+smtp.NewClient should be used instead of smtp.Dial+config.EmailConfig.UseTLS.
What happened?
I enabled SMTP in the general configuration with the instructions provided by my hosting provider https://www.infomaniak.com/fr/support/faq/2427/synchroniser-les-e-mails-sur-tous-vos-appareils.
So I set:
But the server nerver send any email and the login to cosmos server is very slow (timeout wait)
What should have happened?
The cosmos server should by able to sent email and the login should not be slower.
How to reproduce the bug?
Relevant log output
Other details
I did a quick analysis, and what I understand is that the issue is in the send email function: https://github.com/azukaar/Cosmos-Server/blob/master/src/utils/emails.go#L89.
Port 465 is reserved for SMTPS, and the connection should start encrypted directly. So, I think that if the UseTLS option is enabled and the port is 465, the function tls.Dial+smtp.NewClient should be used instead of smtp.Dial+config.EmailConfig.UseTLS.
System details