This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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: 19728
    
  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.
 
Have you checked out Aspose?
 
subject: Facing problem to send mail using javamail api without authentication
 
It's not a secret anymore!