commons-email-1.3.1

下载

http://commons.apache.org/proper/commons-email/download_email.cgi

使用

http://commons.apache.org/proper/commons-email/userguide.html

Email email =newSimpleEmail();
email
.setHostName("smtp.googlemail.com");
email
.setSmtpPort(465);
email
.setAuthenticator(newDefaultAuthenticator("username","password"));
email
.setSSLOnConnect(true);
email
.setFrom("[email protected]");
email
.setSubject("TestMail");
email
.setMsg("This is a test mail ... :-)");
email
.addTo("[email protected]");
email
.send();

猜你喜欢

转载自justice-jl.iteye.com/blog/1867804
今日推荐