From 5b76ae9d1761413fd1337967ad62ae40452a666c Mon Sep 17 00:00:00 2001 From: j-dimension Date: Mon, 9 Dec 2024 00:00:20 +0100 Subject: [PATCH] fixed error during email test receive / send. issue #2724 --- .../java/com/jdimension/jlawyer/services/SystemManagement.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/SystemManagement.java b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/SystemManagement.java index 25062bad..bf0ba537 100644 --- a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/SystemManagement.java +++ b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/SystemManagement.java @@ -1462,11 +1462,12 @@ public void testSendMail(String smtpHost, int smtpPort, String smtpUser, String props.put("mail.smtps.auth.mechanisms", "XOAUTH2"); } + final String smtpPwdFinal=smtpPwd; javax.mail.Authenticator auth = new javax.mail.Authenticator() { @Override public PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(smtpUser, smtpPwd); + return new PasswordAuthentication(smtpUser, smtpPwdFinal); } };