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 Facing problem to send mail using javamail api without authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Facing problem to send mail using javamail api without authentication" Watch "Facing problem to send mail using javamail api without authentication" New topic
Author

Facing problem to send mail using javamail api without authentication

dhaval thakor
Ranch Hand

Joined: Aug 27, 2012
Posts: 53



According code given above i am getting following error . please help me to solve this problem.
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19693
    
  10

Yet another reason why you shouldn't put Java code in a JSP. Based on the compiler message, it appears that the variable named "session" has already been declared. Either you did that, or (more likely) the "session" variable is one which is built into every JSP.

The straightforward solution would of course be to just call your "session" variable something else. But the proper solution would be to take that code out of the JSP entirely and put it in a servlet, or a helper class, or some other Java class.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Facing problem to send mail using javamail api without authentication
 
It's not a secret anymore!