7

I am using following code for sending Email On Yahoo :--

    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);

But I am facing javax.mail.MessagingException [EOF] I am facing this Problem from Last 5 days My LogCat is:---

  Message-ID:<1082699080.2.1356082481793.JavaMail.javamailuser@localhost>
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)

Please Help Thanks,

user1921139
  • 111
  • 1
  • 8

2 Answers2

1

The error traceback shows that you are getting a SMTP error message:

554 Transaction failed : Cannot send message due to possible abuse; please visit http://postmaster.yahoo.com/abuse_smtp.html for more information

While that specific Yahoo! page is not accessible, it is clear from the message that Yahoo! suspects that your message might be spam and is refusing to deliver it. A thread in the Yahoo! Mail Help Community suggested contacting Yahoo! Mail Customer Care for more information and assistance.

Martey
  • 1,631
  • 2
  • 13
  • 23
  • m still not understand. What shoud i do? I have seen this link but I am not able for any help – user1921139 Dec 21 '12 at 11:37
  • That error message is specific to Yahoo!'s SMTP servers. You should use the Customer Care link I posted in my answer to contact Yahoo! directly to find out why your email message is being blocked by the server. – Martey Dec 21 '12 at 22:41
0

Do you have a Yahoo! Mail Plus account?

From JavaMail FAQ:

"Note that free Yahoo! Mail accounts do not allow POP3 or SMTP access. You must purchase a Yahoo! Mail Plus account to get POP3 and SMTP access."

ThePCWizard
  • 3,338
  • 2
  • 21
  • 32