File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Need Help with JavaMail program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Need Help with JavaMail program" Watch "Need Help with JavaMail program" New topic
Author

Need Help with JavaMail program

nik Aggarwal
Greenhorn

Joined: Dec 31, 2010
Posts: 2
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
Bartender

Joined: Oct 14, 2005
Posts: 18986
    
    8

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
Bartender

Joined: Oct 14, 2005
Posts: 18986
    
    8

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?"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help with JavaMail program