John's way is correct, this is the way all sites work really.
e.g
public void sendmailto_Deal(string from, string to, string body)
{
MailMessage m = new MailMessage();
SmtpClient sc = new SmtpClient();
try
{
m.From = new MailAddress("no-reply@yourserver.com");
m.To.Add(new MailAddress(to, "displayname"));
m.Subject = string.Format("YourApplicationName - New email from {0}!", from);
m.IsBodyHtml = true;
m.Body = body;
sc.Host = "smtp.gmail.com";
sc.Port = 587;
sc.Credentials = new System.Net.NetworkCredential("xxx", "xxx");
sc.EnableSsl = true;
sc.Send(m);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}