File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes Send email through servlet jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Send email through servlet jsp " Watch "Send email through servlet jsp " New topic

Send email through servlet jsp

Manas Saxena
Ranch Hand

Joined: Mar 01, 2013
Posts: 38
i am working on making a social networking website .After a user is registered he/she must click an activation link on his/her registered email id.Can someone please give me the code to send an email from my server(tomcat) to any email id.I am allowed to use java based tech. only
I have the mail.jar and activation.jar in place in my eclipse IDE
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
A Google search for "java mail api" will give you lots of examples.

My advice: DO NOT start by trying to code a servlet to send email, code a utility mail sending program that can be tested outside the servlet environment.

Rohit Phular

Joined: Mar 30, 2013
Posts: 2
Even I am trying to achieve same. I have problem.
Look at my post

I would appreciate your help
Manas Saxena
Ranch Hand

Joined: Mar 01, 2013
Posts: 38
Got it resolved.Used java mail api.
A simple 12 to 13 line code got it done
I agree. Here's the link:
subject: Send email through servlet jsp
It's not a secret anymore!