hi there, try this i have successfully done this,
first create four textboxes in a webform whose id s are like this
1.txtFrom
2.txtTo
3.txtSub
4.txtContent
now drag a button from toolbox to send mail

now try the following code
private void Button1_Click(object sender, System.EventArgs e)
{
SmtpMail.SmtpServer="localhost";
mmsg=new MailMessage ();
mmsg.From =txtFrom.Text ;
mmsg.To =txtTo.Text;
mmsg.Subject =txtSub.Text;
mmsg.Body =txtContent.Text;
mmsg.BodyFormat =MailFormat.Html;
mmsg.Priority =MailPriority.High ;
SmtpMail.Send(mmsg);
}
Don't forget to include the namespace
using System.Web.Mail;
also at the begining declare,after the start of the class
protected MailMessage mmsg;
Regards
somissac