Spring을 이용하여 회원가입시 이메일 인증 기능을 구현하다 에러가 발생..
에러 로그
2023-09-12T14:14:57.829+09:00 ERROR 86713 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.mail.MailSendException: Mail server connection failed. Failed messages: jakarta.mail.MessagingException: Exception reading response;
applicatoin.properties 파일

Intellij 로그

mail 포트를 465 -> 587로 변경 후 문제가 해결되었다!
찾으면서 알게된 점
2가지 포트에서
포트 465의 경우 SSL
포트 587의 경우에는 TLS를 사용할 수 있다.
아마 포트 587이 메일 전송에서 공식적으로 권장하고있는 포트이고 구글에서 정책문제로 587포트를 권장하는 것 같았다.
참고 출처 : https://okky.kr/questions/329317.
TLS/SSL : https://kanoos-stu.tistory.com/46