Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help with JavaMail program

 
nik Aggarwal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am trying to send a mail through jsp to a gmail account.

index.jsp




sendMail.jsp



error
javax.servlet.ServletException: javax.mail.AuthenticationFailedException: failed to connect, no password specified?

But i am specfying password.
Please help.
 
Paul Clapham
Sheriff
Pie
Posts: 20713
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, this has nothing at all to do with JSP. Even putting that code in JSP is a bad practice, it should go in a servlet or a helper class, but your question still isn't about servlets or helper classes, it's about JavaMail. So it belongs in the JavaMail forum.
 
Paul Clapham
Sheriff
Pie
Posts: 20713
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't use SMTP to connect to GMail, you use SMTPS. Here's a link to the JavaMail FAQ, of which one FAQ is "How do I connect to GMail?"
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic