What you want to use is the System.Net.Mail namespace (NOT System.Web.Mail)
I am assuming that you are getting your variables from Textboxes? I won't go into checking them (you never want to trust user-entered data), just assume that they are fine for this example:
string _destinationEmail = "test@test.com";
string _subject = "Contact Form";
MailMessage _message = new MailMessage(EmailTextBox.Text, _destinationEmail);
_message.Subject = _subject;
_message.Body = String.Format("<b>Name</b>{0}<br/><b>Email</b>{1}<br/><b>Phone</b>{2}<br/><b>Questions</b>{3}<br/>",
NameTextBox.Text, EmailTextBox.Text, PhoneTextBox.Text, CommentsTextBox.Text);
_message.IsBodyHmtl = true;
SmtpClient _mailClient = new SmtpClient("myMailServer.myDomain.com");
_mailClient.Send(_message);
Response.Redirect(@"http://www.xyz.com", true);
Hope this helps,
m
give me suggestions for what to blog...
http://www.myfriedmind.com/techblog -> thx
Mark as "Answered" if this solves that wee old problem...