This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 18541
    
    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: 18541
    
    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
 
Similar Threads
creating website basic question
JavaMail Session cannot be resolved to a type
Email in jsp
Email with jsp
E mail using JSP Error