Whiteship
  • Home
  • 인프런 강의
  • Java
  • Spring
  • JPA
  • SDE Tips
Subscribe

gmail

A collection of 1 post
gmail

JavaMail - 간단한 Text 메시지 보내기

로컬에 설치한 SMTP로 보내려고 했더니, 외부로 나가질 않는데, 외부로 내보내는 설정을 못찾아서 그냥 Gmail SMTP 사용해서 보내봅니다. public void sendMail(String id, String passwd, String title, String contents, String to) { Properties props = makeSMTPProperties(); Authenticator auth = getAutheticator(id, passwd); Session session = Session.getDefaultInstance(props, auth); URLName urln = new URLName(“smtp”, “smtp.
Aug 7, 2008 — 2 min read
Whiteship © 2022
Powered by Ghost