I’m stumped and not sure how to proceed. I am maintaining a legacy app and they want to convert the mail servers to TLS V1.2. I am getting the following error –
DEBUG SMTP: MessagingException while sending, THROW: [7/3/24 13:41:40:006 PDT] 000021e5 SystemOut O com.sun.mail.smtp.SMTPSendFailedException: 503 5.7.0 encryption too weak 0 less than 128 ; nested exception is: com.sun.mail.smtp.SMTPSenderFailedException: 503 5.7.0 encryption too weak 0 less than 128
pom.xml
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.0</version>
</dependency>
Code:
props.put("mail.smtp.host", smtpHost);
props.put("mail.smtp.auth", "false");
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.ssl.protocols","TLSv1.2");
props.put("mail.smtp.port", "25");
props.put("mail.debug", "true");
// Get session
Session session = Session.getInstance(props, null);
session.setDebug(true);
......Setting from,to
Transport.send(message);
I can see in the logs that connection to the server is good but I get the above error after that. Ive googled everywhere and I dont see aything with that specific error.
Anyone run into this before?
Tried changing the parameters in the properties but nothing has worked so far.
Auth is false.
And SSL has to be V1.2
Dawn White is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.