<%
Properties props = new Properties();
props.put("mail.smtp.host","smtp.mail.yahoo.com");
Session s = Session.getInstance(props);
MimeMessage message = new MimeMessage(s);
InternetAddress from = new InternetAddress("xiao_xiao112@163.com");
message.setFrom(from);
InternetAddress to = new InternetAddress("zhang_xiao_tian@sohu.com");
message.addRecipient(Message.RecipientType.TO,to);
message.setSubject("Test from JavaMail.");
message.setText("Hello from JavaMail!");
Store store = s.getStore("pop3");
store.connect("pop.mail.163.com","xiao_xiao112","aaaa");
Transport.send(message);
store.close();
%>
<html>
<head>
<title>
testjavamail
</title>
</head>
<body bgcolor="#ffffff">
<p>test javamail</p>
</body>
</html>
鎻愮ず閿欒淇℃伅锛?
javax.mail.MessagingException: Connect failed;
nested exception is:
java.net.UnknownHostException: pop.mail.163.com
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:106)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at _mail1__jsp._jspService(/mail1.jsp:2)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:549)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:184)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:149)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:257)
at com.caucho.server.port.WorkerThread.run(WorkerThread.java:123)
at java.lang.Thread.run(Thread.java:536)
鍏充簬閭鐢ㄦ埛鍚嶅瘑鐮佷粈涔堢殑鏄病闂鐨?
7 涓В鍐虫柟妗?/h2>
#1
up
#2
閭欢鏈嶅姟鍣ㄥ湴鍧€鍐欓敊浜?
pop.163.com
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=372
#3
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=136
#4
鏀瑰悗鍑鸿繖鏍风殑閿欒锛?
javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at _mail1__jsp._jspService(/mail1.jsp:2)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:549)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:184)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:149)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:257)
at com.caucho.server.port.WorkerThread.run(WorkerThread.java:123)
at java.lang.Thread.run(Thread.java:536)
鎬庝箞鍔?
#5
杩欐槸鍥犱负浣犵殑閭鏈嶅姟鍣ㄩ渶瑕侀獙璇佺敤鎴疯韩浠斤紝浣犺繕鏄湅鐪嬫垜缁欎綘鐨勯摼鎺ュ惂锛?
#6
鎶婁富鏈哄湴鍧€鏀逛负 pop.163.com
#7
濡傛灉瑕侀獙璇佺敤鎴疯韩浠界▼搴忚嚜鍔ㄤ細璺冲嚭瀵硅瘽妗嗙殑锛屾垜浠ュ墠鍋氱殑鏃跺€欏氨鏄繖鏍风殑銆傜幇鍦ㄥ浗鍐呬竴鑸殑閭欢鎻愪緵鍟嗛兘涓嶆敮鎸佽繖绉嶅姛鑳界殑锛屽ソ璞ahoo鏄彲浠ョ殑锛屼絾瑕佹敹璐圭殑銆?
#1
up
#2
閭欢鏈嶅姟鍣ㄥ湴鍧€鍐欓敊浜?
pop.163.com
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=372
pop.163.com
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=372
#3
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=136
#4
鏀瑰悗鍑鸿繖鏍风殑閿欒锛?
javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at _mail1__jsp._jspService(/mail1.jsp:2)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:549)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:184)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:149)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:257)
at com.caucho.server.port.WorkerThread.run(WorkerThread.java:123)
at java.lang.Thread.run(Thread.java:536)
鎬庝箞鍔?
#5
杩欐槸鍥犱负浣犵殑閭鏈嶅姟鍣ㄩ渶瑕侀獙璇佺敤鎴疯韩浠斤紝浣犺繕鏄湅鐪嬫垜缁欎綘鐨勯摼鎺ュ惂锛?
#6
鎶婁富鏈哄湴鍧€鏀逛负 pop.163.com
#7
濡傛灉瑕侀獙璇佺敤鎴疯韩浠界▼搴忚嚜鍔ㄤ細璺冲嚭瀵硅瘽妗嗙殑锛屾垜浠ュ墠鍋氱殑鏃跺€欏氨鏄繖鏍风殑銆傜幇鍦ㄥ浗鍐呬竴鑸殑閭欢鎻愪緵鍟嗛兘涓嶆敮鎸佽繖绉嶅姛鑳界殑锛屽ソ璞ahoo鏄彲浠ョ殑锛屼絾瑕佹敹璐圭殑銆?
#1
up
#2
閭欢鏈嶅姟鍣ㄥ湴鍧€鍐欓敊浜?
pop.163.com
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=372
pop.163.com
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=372
#3
http://www.javayou.com/showlog.jspe?cat_id=3&log_id=136
#4
鏀瑰悗鍑鸿繖鏍风殑閿欒锛?
javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at _mail1__jsp._jspService(/mail1.jsp:2)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:549)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:184)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:149)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:257)
at com.caucho.server.port.WorkerThread.run(WorkerThread.java:123)
at java.lang.Thread.run(Thread.java:536)
鎬庝箞鍔?
#5
杩欐槸鍥犱负浣犵殑閭鏈嶅姟鍣ㄩ渶瑕侀獙璇佺敤鎴疯韩浠斤紝浣犺繕鏄湅鐪嬫垜缁欎綘鐨勯摼鎺ュ惂锛?
#6
鎶婁富鏈哄湴鍧€鏀逛负 pop.163.com
#7
濡傛灉瑕侀獙璇佺敤鎴疯韩浠界▼搴忚嚜鍔ㄤ細璺冲嚭瀵硅瘽妗嗙殑锛屾垜浠ュ墠鍋氱殑鏃跺€欏氨鏄繖鏍风殑銆傜幇鍦ㄥ浗鍐呬竴鑸殑閭欢鎻愪緵鍟嗛兘涓嶆敮鎸佽繖绉嶅姛鑳界殑锛屽ソ璞ahoo鏄彲浠ョ殑锛屼絾瑕佹敹璐圭殑銆?