Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Rep Power
    0

    Exclamation java mail 530 authentication required --help

    HI
    I AM DESIIGNING A FEEDBACK FORM THAK WILL TAKE FEEDBACK FROM THE USER AND SEND AN EMAIL TO CONCERNED PERSON USING SERVLET BUT I FACED AN EXCEPTION

    exception:

    EHLO localhost.localdomain
    250-mx.google.com at your service, [122.163.8.16]
    250-SIZE 28311552
    250-8BITMIME
    250-AUTH LOGIN PLAIN
    250 ENHANCEDSTATUSCODES
    DEBUG SMTP: Found extension "SIZE", arg "28311552"
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<confused.hell@gmail.com>
    530-5.5.1 Authentication Required. Learn more at
    530 5.5.1 My client isn&#39;t accepting my username and password 30sm1751526w ff.8
    com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Le arn more at
    530 5.5.1 My client isn&#39;t accepting my username and password 30sm1751526w ff.8

    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(S MTPTransport.java:1 388)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTrans port.java:959)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTr ansport.java:583)
    at com.khushiiit.feedback.core.Mail.sendMail(Mail.jav a:63)
    at com.khushiiit.feedback.core.MailServlet.doGet(Mail Servlet.java:31)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:114)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:91)
    at com.caucho.server.dispatch.ServletFilterChain.doFi lter(ServletFilterC hain.java:103)
    at com.caucho.server.webapp.WebAppFilterChain.doFilte r(WebAppFilterChain .java:181)
    at com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocatio n.java:266)
    at com.caucho.server.http.HttpRequest.handleRequest(H ttpRequest.java:269 )
    at com.caucho.server.port.TcpConnection.run(TcpConnec tion.java:603)
    at com.caucho.util.ThreadPool$Item.runTasks(ThreadPoo l.java:721)
    at com.caucho.util.ThreadPool$Item.run(ThreadPool.jav a:643)
    at java.lang.Thread.run(Thread.java:595)
    exception : com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
    530 5.5.1 My client isn&#39;t accepting my username and password 30sm1751526w ff.8


    Mycode:

    Properties properties = new Properties();
    properties.load(this.getClass().getResourceAsStrea m("resource.properties"));
    String user = properties.getProperty("mail.smtp.user");
    String password = properties.getProperty("mail.smtp.password");
    Authenticator authenticator = new SMTPAuthenticator(user, password);
    Session session = Session.getDefaultInstance(properties, authenticator);
    session.setDebug(true);
    MimeMessage msg = new MimeMessage(session);
    InternetAddress addressFrom = new InternetAddress(user);
    msg.setFrom(addressFrom);
    InternetAddress[] addressTo = new InternetAddress[email.length];
    for (int i = 0; i < email.length; i++) {
    addressTo[i] = new InternetAddress(email[i].trim());
    }
    msg.setRecipients(Message.RecipientType.TO, addressTo);
    msg.setSubject(subject);
    msg.setContent(data, "text/plain");
    tr = session.getTransport("smtp");
    tr.connect("smtp.gmail.com", user, password);
    msg.saveChanges();
    tr.sendMessage(msg, msg.getAllRecipients());
    tr.close();



    ONE MORE THING I WANAT TO SAY IS THAT WHEN I RUN THIS CODE UNDER NETBEANS AND USED INBUILT GLASS-FISH SERVER , IT WORK FINE BUT WHEN I RUN THIS USING RESIN-3.1.5 , MENTIONED EXCEPTION REFLECT

    PLEASE GET ME OUT OF THIS MESS...

    THANX IN ADVANCE

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Hi ravinder,

    Welcome to our community, :)

    Regarding you thread, please don't use capital letters. It's make much difficult to read. Not much easy to read. And also before post the next post, please read our FAQ page.

Similar Threads

  1. Retreiving of mail body using mail number
    By chandu.v09 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-13-2008, 02:25 PM
  2. Help required: regarding java.net.URL api
    By tarzan007 in forum New To Java
    Replies: 3
    Last Post: 11-07-2007, 04:46 AM
  3. Sending a mail with the local mail program
    By thedude in forum Advanced Java
    Replies: 2
    Last Post: 07-23-2007, 12:19 PM
  4. 530 5.7.0 Authentication Required - JavaMail gmail
    By simon in forum Advanced Java
    Replies: 1
    Last Post: 07-14-2007, 11:52 PM
  5. JavaMail:Authentication required error
    By bbq in forum Advanced Java
    Replies: 1
    Last Post: 07-05-2007, 04:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •