Monday, May 31, 2010

530 Access denied - Mail sending Error

If you are using customized mailing systems.And if you found below mentioned problem.The problem might be your email id's password which is used for sending mails.

EHLO server3
250-smtp103.**.**.in2.yahoo.com
250-AUTH LOGIN PLAIN XYMCOOKIE
250-PIPELINING
250 8BITMIME
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XYMCOOKIE"
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Attempt to authenticate
AUTH LOGIN
334 VXNlcm5hbWU6
Y29sbGVjdEBhbWFyam90aGkubmV0
334 UGFzc3dvcmQ6
bWFzdGVy
530 Access denied
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:267)
at javax.mail.Service.connect(Service.java:137)
at SSLMail.sendMail(SSLMail.java:234)
at NewThread.run(SMSMailRecipient.java:259)

2 comments:

  1. What is the solutions of this problem
    530 Access denied
    javax.mail.AuthenticationFailedException
    at javax.mail.Service.connect(Service.java:267)
    at javax.mail.Service.connect(Service.java:137)
    at SSLMail.sendMail(SSLMail.java:234)
    at NewThread.run(SMSMailRecipient.java:259)
    My Email id is :- logicalamit@gmail.com


    final String username = "dtlinksolutions";
    final String password = "datalink123";
    Properties props = new Properties();
    javax.mail.Session mailsession;

    String[] emailvalues={"logicalamit@gmail.com",""};

    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.starttls.enable", "true");
    props.put("mail.smtp.host", "smtp.mail.yahoo.com");
    props.put("mail.smtp.port", "587");

    mailsession = javax.mail.Session.getInstance(props,
    new javax.mail.Authenticator()
    {

    @Override
    protected PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(username, password);
    }
    });
    try
    {
    Message message = new MimeMessage(mailsession);
    message.setFrom(new InternetAddress("dtlinksolutions@yahoo.in"));
    message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(emailvalues[0]));
    message.setSubject("DataLink E-Mail Reminder Test");
    //message.setText(emailvalues[1]);

    if(setMessage.compareTo("Voice Server is failure")==0)
    message.setText("Voice Server is not Working Properly");

    else
    {
    message.setText(setMessage+" Drive is using 80% above please delete some data");
    }
    Transport.send(message);//send(message);

    }

    catch(Exception e)
    {
    e.printStackTrace();
    }

    ReplyDelete
  2. You cannot access "smtp.mail.yahoo.com" using this method. You can use smtp relay service given by some service providers like www.smtp2go.com. Signup for free plan and try again. http://www.smtp2go.com/support this page give you lot of information. Use telnet before sending mail using your application.

    (C:\Documents and Settings\Administrator>telnet smtp2go.com 2525)

    ReplyDelete

type your comments here