[error] JAVA GMAIL 발송(SMTP)시에 나타난 에러들

·2022년 4월 3일
0

오류해결모음

목록 보기
5/19


1. "AuthenticationFailedException: 535-5.7.8 Username and Password not accepted"

👉🏻 보내는 사람의 구글 계정의 "보안 수준이 낮은 앱 엑세스"가 허용되어있지 않아 허용으로 바꿔줌


2. send mail:javax.mail.MessagingException: Could not convert socket to TLS;

👉🏻 props.put("mail.smtp.ssl.protocols", "TLSv1.2"); 코드 추가 해줌


3. Could not connect to SMTP host: smtp.gmail.com, port: 587;

👉🏻 props.put("mail.smtp.ssl.enable", "true"); 코드 추가 + 포트번호 456으로 변경

0개의 댓글