Hi,
has there been a change in how the Mail plugin work in Servoy 6.0 than in 5.2.x?
I have a solution I am migrating from 5 to 6 (I started this before 7 was out and also they didn’t want me going to 6.1…) and emailing that was working on Servoy 5 using the standard Servoy mail plugin now isn’t working…
The error in the log is
javax.mail.MessagingException: Could not connect to SMTP host: send.nhs.net, port: 587;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:317)
All the mail plugin parameters are the same in the Admin/Server Plugins page and I am using the extra property
mail.smtp.starttls.enable=true
```in my code.
Server Network Settings are
SocketFactory.tunnelConnectionMode = 2WaySocket
SocketFactory.compress: = true
SocketFactory.useSSL: = false (which is what other servers are set to & I thought this is only for communication between Servoy Server & Servoy Client)
SocketFactory.tunnelUseSSLForHttp: = false
Looking around the 'net this is an issue, but about the only thing that I could find that some used to solve it was to to do this
System.setProperty(“sun.security.ssl.allowUnsafeRenegotiation”, true);
as some kind of Java property, but I'm not sure how to set this from Servoy. The implication is that Servoy is trying to talk to what should be an HTTPS port, but is using HTTP...
I found the (new) page for the Java mail smtp properties at
https://javamail.java.net/nonav/docs/api/com/sun/mail/smtp/package-summary.html
but wasn't sure if there was something extra from there I needed to set.
Java on Server is set to 'Direct Connection', I have cleared caches, restarted etc., but still no luck.
Other production servers are working fine (but running Servoy 5).
It is essential that the mail stuff uses SLL/TLS as the data being sent is Medical info (patient data etc.)
I hope someone can help <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />
Thanks
Rafi