Unable to Send Mail - javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
<prop key="mail.smtp.starttls.enable">${mail.smtp.starttls.enable}</prop>
<prop key="mail.smtp.ssl.enable">true</prop>
You want either mail.smtp.ssl.enable
for implicit SSL directly after TCP connect (port 465) or mail.smtp.starttls.enable
for explicit SSL using the STARTTLS command (port 25). But with your current properties you set both to true.
This means it will do a TCP connect to port 25 and try a SSL handshake there. This will fail because the server is sending a plain text greeting from the SMTP dialog and not the expected SSL handshake. Thus you get
Unrecognized SSL message, plaintext connection?
To fix it make sure that you either use implicit or explicit SSL but not both depending on the port, i.e. for port 25 mail.smtp.ssl.enable
should be false.