Aditya Mishra
Aditya Mishra

Reputation: 1

I created a simple spring boot project that sends mail to people it was working fine after two days when I Opened it, it started giving error why?

I created a Spring Boot project and used JavaMailSender like this.

I have added all the dependencies and it was working fine then why it suddenly started giving error it is saying that "could not convert socket to tls"? Why now why wasn't this error previously why is only appearing has there been any update in javaMailSender recently? it was sending mail to desired user till tomorrow and suddenly started giving error entire error message with debug message is like this

I tried sending mail using JavaMailSender, but it is giving error saying that "Could not convert socket to TLS".

I wanted to send mail to user but it is giving error "Could not convert socket to TLS".

Upvotes: -1

Views: 56

Answers (1)

Himali Sathavara
Himali Sathavara

Reputation: 7

If your solution was working correctly previously and stopped suddenly then first thing to check is the mail server configuration. You need to check if TLS support is updated on the mail server you are using. If it is enabled you need to make changes to your application by enabling spring.mail.properties.mail.smtp.starttls.enable and changing the port number.

Upvotes: 0

Related Questions