亚洲色成人网站www永久,亚洲欧美人成视频一区在线,亚洲国产成人高清在线观看,亚洲精品久久久久久动漫,亚洲国产精品久久电影欧美

數(shù)據(jù)專欄

智能大數(shù)據(jù)搬運工,你想要的我們都有

科技資訊

科技學院

科技百科

科技書籍

網(wǎng)站大全

軟件大全

HDC調(diào)試需求開發(fā)(15萬預算),能者速來!>>> 我用javamail向.@sina.cn 或者 @qq.com發(fā)送郵件失敗。只能給本公司郵件服務(wù)器中的郵箱發(fā)送郵件。請問這是為什么? 異常信息: javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 : Relay access denied ; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 : Relay access denied ; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 : Relay access denied at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584) at javax.mail.Transport.send0(Transport.java:169) at javax.mail.Transport.send(Transport.java:98) at test.SendMailTest.sendMail(SendMailTest.java:70) at test.SendMailTest.main(SendMailTest.java:117) Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 : Relay access denied ; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 : Relay access denied 發(fā)送郵件失敗 at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1094) ... 5 more Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 : Relay access denied ... 6 more public boolean sendMail() { Properties propers = new Properties(); propers.put("mail.smtp.host", host); propers.put("mail.smtp.auth", "true"); // propers.setProperty("mail.smtp.socketFactory.fallback", "false"); // propers.setProperty("mail.smtp.port", "25"); // propers.setProperty("mail.smtp.socketFactory.port", "25"); Session session = Session.getDefaultInstance(propers,new Authenticator() { public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } }); Message message = new MimeMessage(session); try { message.setText(content); message.setFrom(new InternetAddress(username, parName)); message.setSubject(subject); Address[] addressesTo = new InternetAddress[to.length]; for (int i = 0; i < to.length; i++) { addressesTo[i] = new InternetAddress(to[i]); } message.addRecipients(Message.RecipientType.TO, addressesTo); // InternetAddress[] addressCc = new InternetAddress[cc.length]; // for (int i = 0; i < cc.length; i++) { // addressCc[i] = new InternetAddress(cc[i]); // } // message.addRecipients(Message.RecipientType.CC, addressCc); message.setContent(content,"text/html;charset=GBK"); message.saveChanges(); Transport.send(message); System.out.println("send mail ok!"); } catch (Exception e) { e.printStackTrace(); return false; } return true; } String host ="smtp.gdyilian.com"; String username = "payreporter@payeco.com"; String password = "4489a6"; // private String name = "yangbo"; // private String value = "343567562"; // private String to[] = {"yang.bo@payeco.com"}; private String to[] = { "yangbo343567562@sina.cn", "lovesmellysmelly@qq.com", "yang.bo@payeco.com" };// 收件人 private String cc[] = {"lovesmellysmelly@qq.com" }; // private String cc[] = { "yangbo343567562@sina.cn", // "lovesmellysmelly@qq.com", "yang.bo@payeco.com" };// 抄送人; private String from = "yangbo343567562@sina.cn"; private String subject = "YANGBO"; private String content = "this is the Test javamail"; private String parName = "system";
技術(shù)問答
2013-07-17 18:53:00
HDC調(diào)試需求開發(fā)(15萬預算),能者速來!>>> 請教請教, 一個網(wǎng)站登錄,使用了CAS單點登錄服務(wù),當輸入用戶名和密碼后去CAS服務(wù)去驗證,驗證通過后CAS服務(wù)會返回ticket票據(jù),我在IE,Firefox都會有ticket票據(jù)產(chǎn)生,然后登錄成功,但是在chrome下,沒有ticket產(chǎn)生,并且又回到了登錄頁面。如果將CAS登錄地址改為用ip,chrome也能產(chǎn)生ticket,并且登錄成功。請問是什么原因,難道chrome的cookie機制不一樣嗎?
技術(shù)問答
2013-07-04 13:59:00
HDC調(diào)試需求開發(fā)(15萬預算),能者速來!>>>
我已成功大家 CAS 單點登錄服務(wù)器(簡稱 CAS),地址為: https://cas
有兩個應(yīng)用,已經(jīng)它們集成在單點登錄環(huán)境中,它們是: REST Server,地址為:http://rest-server REST Client,地址為:http://rest-client
當進入 REST Client 時,發(fā)送請求: http://rest-client/product.html
由于沒有認證,所以該請求將會被重定向到 CAS 上,此時請求為:https://cas/login?service= http://rest-client/product.html
重定向到 CAS 的登錄頁面,輸入用戶名與密碼,CAS 判斷認證成功后,將請求重定向到: http://rest-client/product.html
此時,在 product.html 頁面中,通過一個 jQuery Ajax 請求去獲取 REST Server 上的數(shù)據(jù),代碼如下: $.ajax({ url: 'http://rest-server/ws/rest/ProductService/products', // 注意這個 URL success: function(data) { // data 是一個 JSON 數(shù)據(jù),可渲染到 DOM 上 } });
此時,發(fā)現(xiàn) Ajax 請求出現(xiàn)問題,Status Code 為 302 Found。
如果直接在瀏覽器地址欄上發(fā)送這個 URL,再次刷新頁面,就可以獲取 JSON 數(shù)據(jù)。
目前我的解決方案不太優(yōu)雅,使用了一個 iframe 來發(fā)送這個 URL,代碼如下: $.ajaxSetup({ error: function(jqXHR, textStatus, errorThrown) { if (textStatus == 'error' && errorThrown == '') { if (jqXHR.status == 0 || jqXHR.status == 12017) { var $iframe = $('