wood burning stoves 2.0
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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Need Help with JavaMail program" Watch "Need Help with JavaMail program" New topic

Need Help with JavaMail program

nik Aggarwal

Joined: Dec 31, 2010
Posts: 2
I am trying to send a mail through jsp to a gmail account.



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

But i am specfying password.
Please help.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19739

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

Joined: Oct 14, 2005
Posts: 19739

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
It's not a secret anymore!