Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Send email through servlet jsp

 
Manas Saxena
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 13056
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Bill
 
Rohit Phular
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even I am trying to achieve same. I have problem.
Look at my post

https://www.coderanch.com/t/608447/java/java/send-email-business-service-login

I would appreciate your help
 
Manas Saxena
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it resolved.Used java mail api.
A simple 12 to 13 line code got it done
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic