관리 메뉴

moozi

google smtp, naver smtp 사용시 참고 본문

TIS_2022/스마트응용SW2022_1기

google smtp, naver smtp 사용시 참고

moozi 2022. 5. 4. 14:12

1. 구글

        serverInfo = new Properties();
        serverInfo.put("mail.smtp.host", "smtp.gmail.com");
        serverInfo.put("mail.smtp.port", "587");
        serverInfo.put("mail.smtp.starttls.enable", "true");
        serverInfo.put("mail.smtp.auth", "true");
        serverInfo.put("mail.smtp.debug", "true");
        //serverInfo.put("mail.smtp.socketFactory.port", "587");
        //serverInfo.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
        //serverInfo.put("mail.smtp.socketFactory.fallback", "false");
        serverInfo.put("mail.smtp.ssl.trust", "smtp.gmail.com");
        serverInfo.put("mail.smtp.ssl.protocols", "TLSv1.2");


       계정에서 '보안 수준이 낮은 앱의 액세스' 허용

 

2. 네이버

 

       serverInfo = new Properties();
        serverInfo.put("mail.smtp.host", "smtp.naver.com");
        serverInfo.put("mail.smtp.port", "465");
        serverInfo.put("mail.smtp.starttls.enable", "true");
        serverInfo.put("mail.smtp.auth", "true");
        serverInfo.put("mail.smtp.debug", "true");
        serverInfo.put("mail.smtp.socketFactory.port", "465");
        serverInfo.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
        serverInfo.put("mail.smtp.socketFactory.fallback", "false");
        serverInfo.put("mail.smtp.ssl.trust", "smtp.naver.com");
        serverInfo.put("mail.smtp.ssl.protocols", "TLSv1.2");

 

둘 모두 2단계 인증 사용안함으로 변경 

   

'TIS_2022 > 스마트응용SW2022_1기' 카테고리의 다른 글

5/26 Spring Boot Board.zip  (0) 2022.05.26
5/20 Guestbook.zip  (0) 2022.05.20
google smtp, naver smtp 사용시 참고  (0) 2022.05.04
5/3 mvcboard  (0) 2022.05.03
5/2 mvcboard.zip  (0) 2022.05.03
4/28 Board.zip  (0) 2022.04.28
0 Comments
댓글쓰기 폼