我使用下面的代碼來發送電子郵件在雅虎: -我無法從Java郵件API發送雅虎郵件
Properties props1 = new Properties();
EmailAuthenticator authenticator = new EmailAuthenticator(account);
props1.setProperty("mail.transport.protocol", "smtps");
props1.setProperty("mail.host", "smtp.mail.yahoo.com");
props1.put("mail.smtp.auth", "true");
props1.put("mail.smtp.port", "587");
props1.put("mail.smtp.starttls.enable", "true");
smtpSession = Session.getInstance(props1, authenticator);
smtpSession.setDebug(true);
但我面對javax.mail.MessagingException [EOF]
我面臨着來自過去5天這個問題我logcat的是:---
Message-ID:<[email protected]>
Subject: Hello
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
554 Transaction failed : Cannot send message due to possible abuse; please visit http://postmaster.yahoo.com/abuse_smtp.html for more information
DEBUG SMTP: got response code 554, with response: 554 Transaction failed : Cannot send message due to possible abuse; please visit http://postmaster.yahoo.com/abuse_smtp.html for more information
RSET
DEBUG SMTP: EOF: [EOF]
javax.mail.MessagingException: [EOF]
com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1321)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:637)
javax.mail.Transport.send0(Transport.java:189)
javax.mail.Transport.send(Transport.java:118)
com.privymo.javamail.EmailManager.sendMail(EmailManager.java:203)
請幫助 感謝,
不知道,但檢查您是否正確傳遞uerid,PWD用於訪問郵件服務(發送郵件) – kumar
用戶名和密碼是 – user1921139
@ user1921139你解決它的權利?? –