Sorry, its not in JSP , its in
Servlet.
Here is my code of Servlet
<CODE>
public class SiteFeedback extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
doPost(req,res);
}
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
String Name=req.getParameter("Name");
String EMail=req.getParameter("EMail");
String Like=req.getParameter("Like");
String Friendly=req.getParameter("Friendly");
String Download=req.getParameter("Download");
String Comments=req.getParameter("Comments");
String Rating=req.getParameter("Rating");
if (Like.equals("Yes"))
Like="Like";
else
Like="Don't Like";
if(Friendly.equals("Yes"))
Friendly="User Friendly";
else
Friendly="Not User Friendly";
if(Download.equals("Fast"))
Download="Fast";
else
Download="Slow";
String MsgBody="Hi, I am " + Name + ", and I visited your site at
www.seeconsulting.com." + " I would like to offer my comments about the site." + (char)13 + (char)13 + "The site is " + Friendly + " and the download is " + Download + ". " + (char)13 + "On the whole, I " + Like + " the site, with my overall rating being " + Rating + ". " +(char)13 + (char)13 + "Additionally my comments are " + Comments + ". " +(char)13 + (char)13 + "You can get back to me at this Id: " + EMail ;
Properties props=new Properties();
props.put("mail.smtp.host","mail.seeconsulting.com");
Session session=Session.getDefaultInstance(props,null);
try
{
..........
..........
</CODE>