Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hard core auth error please Help~

Xiao Ava
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry to bother everyone here but i am desperate
i am doin a javamail how ever i keep encountering the same error for the whole day and makes my headache too painful to think
this is the error msh
535 authorization failed
javax.mail.SendFailedException: Sending failed;
nested exception isL
class javax.mail.AuthenticationFailedException
however i DID auth myself and over write the Authenticator with these..
public final class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
String username = "<my User Name>";
String password = "<my password>";
return new PasswordAuthentication(username, password);
also i put the follow in the mail class
Properties prop = System.getProperties();
prop.put("mail.smtp.auth", "true");
prop.put("mail.debug", "true");

Authenticator auth = new SMTPAuthenticator();
Session sec1 = Session.getDefaultInstance(prop,auth)
this is the way that is being taught in several online tutorial how ever still i cannot send my email to the yahoo smtp server which address is
someone please help me and i will be very VERY grateful.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic