Hello,
The plugin.mail doesn’t work anymore on Servoy 7 while working well on Servoy 8. Anyone with the same issue?
Everytime I try to send an email, the error “could not connect to SMTP” appears. I think there is a problem with the TLS 1.2 protocol.
Thank you,
Stefania
HI Stefania,
I use the following for Office365 to force TLS 1.2:
/**
* @properties={typeid:24,uuid:"AABE20D5-EBA6-4210-BA5F-AA5747432095"}
* @return {Array<String>}
*/
function email_settings() {
/** @type {Array<String>} */
return new Array('mail.smtp.starttls.enable=true','mail.smtp.ssl.enable=false','mail.smtp.port=587', 'mail.smtp.tls.enable=true', 'mail.smtp.ssl.protocols=TLSv1.2', 'mail.smtp.host=smtp.office365.com');
}
Then I use this as the last parameter when calling
sendMail(to, from, subject, msgText, cc, bcc, attachment, email_settings())
Hi Swingman,
Thanks for the reply.
I have the same problem with different host not only with Office365.
Any advice on how to force the TLS 1.2 for different host?
We added “mail.smtp.ssl.trust=”+_send_host to the send properties of the plugins.mail.sendMail() command.
Where _send_host is the name of the mail server.
In our case that solved the problem.
Regards,