Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2008, 10:23 AM
Member
 
Join Date: Apr 2008
Posts: 3
ravinder.kadiyan is on a distinguished road
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'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'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'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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-30-2008, 11:08 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 1,294
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Want to make your IDE the best?Vote Now
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT +3. The time now is 02:35 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org