The Java API for sending mail is called JavaMail. See the JavaEnterpriseEditionFaq for links to an extensive tutorial with many code examples. You'll need access to a mail server.
Paul Okeke wrote:I want a situation where by, on submittion of a form.
My servlet will automatically send the user a confirmatory email
after submiting the form you will get the details in your servlet ....if you want to make any db operations do it first ...then just call a method of a helper class which will send mail for using java mail API ...
also send the values you had taken from form to the method through arguments (like mySendMailFunction(name,age,location))
take these values in your helper method and do the reaming coding ..for that just check the below link
thanks a lot for that response!
But please, can you help me with a download link to that source?
Or any other source that will guide on the use of Java Mail API.
Paul Okeke wrote:But please, can you help me with a download link to that source?
Lester pointed you to the JavaEnterpriseEditionFaq - if you look in there you will find links to the JavaMail Home page, the FAQ, Introduction, tutorials, and much more.
after submiting the form you will get the details in your servlet ....if you want to make any db operations do it first .. then as was told earlier call a method or a simple pojo method to send an email. you can do it using socket and smtp. that will work.