my dog learned polymorphism
The moose likes JSP and the fly likes Sending Html values as a email to JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Sending Html values as a email to JSP" Watch "Sending Html values as a email to JSP" New topic

Sending Html values as a email to JSP

Rams kuwait

Joined: Nov 25, 2008
Posts: 11

I want to send values which are submitted through html file as a email to JSP.but the submitter will receive the message as "succussfully your values sent" and at the same time the values should reach the particular email address thru Jsp page.

awaiting your response..

Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


To send a mail , you need a SMTP server (like Lotus which you or company host ) running in the network or you can use gmail smtp server. And use JavaMail API to send mails.

few tutorial and sun tutorial

Your HTML should call servlet ( or some action class if struts) and write the logic to send mail , if successful forward to success jsp with our success message as described , else failure message. ( failure usaully denotes problem in mail sent to SMTP, and not actual delivery of mail)

I agree. Here's the link:
subject: Sending Html values as a email to JSP
It's not a secret anymore!