Reputation: 11
I want to testing send mail using JavaMailSender,the code work fine but when I setting my pc time to the past it throw this exception.
Could not convert socket to TLS
Here is my code
MimeMessageHelper message = new MimeMessageHelper(mimeMessage, "UTF-8");
message.setSubject(subject);
message.setFrom(config.getMailFrom());
message.setTo(recipientEmail);
String htmlContent = templateEngine.process("email.html", ctx);
message.setText(htmlContent, true );
mailSender.send(mimeMessage);
catch (Exception e) {
throw new Exception();
}
I try to turn off the window defender but it didn't work.
My pc does not have any antivirus software or anything like protection software.It's some kind of JavaMailSender protection or a bug?
Upvotes: 0
Views: 73