Click here to Skip to main content
15,035,723 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

In my website i have a enqiury form.if the enqiury statement are typed and click the submit button the statement are sent to my mail id . How can i do this ? plz help me.


This is trivial and widely documented on the web, did you look ? Copy the code you can get from 100s of web posts over the years, change the mail server code to match your mail server, and you're done.
check the following code
 var mail = new MailMessage();
mail.From = new MailAddress("your email address");

mail.Subject = "Edu-Kinect Event Information";
mail.IsBodyHtml = true;
mail.Body = "your comments";
var mailClient = new SmtpClient("", 587);
mailClient.EnableSsl = true;
mailClient.Credentials = new System.Net.NetworkCredential("your email address", "your password");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900