Getting Mailer to work with Use SSL option

when my mailer.json is like this i have no issue sending email
{
“name”: “main”,
“module”: “mail”,
“action”: “setup”,
“options”: {
“host”: “smtp.office365.com”,
“port”: 587,
“username”: “it@",
“password”: "

}
}
But if tick ‘Use SSL’ then following error;

server-connect:server Got error? [Error: 139988254070720:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:
server-connect:server ] {
server-connect:server library: ‘SSL routines’,
server-connect:server function: ‘ssl3_get_record’,
server-connect:server reason: ‘wrong version number’,
server-connect:server code: ‘ESOCKET’,
server-connect:server command: ‘CONN’
server-connect:server } +0ms

i have been at this for sometime and not able to resolve the issue. On the linux server i have OpenSSL 3.0.2 15 Mar 2022.
What is missing? Help much appreciated…

I believe the outgoing smtp server for office365 uses STARTTLS instead of SSL/TLS. I don’t think Wappler supports that protocol? I may be wrong but I believe I had an issue similar to this before. Would probably be a @patrick question?

For port 587 you should not use SSL, it uses STARTTLS for a secure connection. Normally port 465 is for SSL connections.

The mailer module uses the Nodemailer package, you could check their documentation for specific settings.

https://nodemailer.com/smtp/

i dug into nodemailer. it seems it is not simple to go SSL. And realized without SSL nodemailer negotiates and fall back to best option that works for two ends. so i too settled for that.