private void Button1_Click(object sender, System.EventArgs e){MailMessage mail = new MailMessage(); mail.To = txtTo.Text; //put the TO ADDRESS here.mail.From = txtFrom.Text; //put the FROM ADDRESS here.mail.Subject = txtSubject.Text; //put the SUBJECT here.mail.Body = txtBody.Text; //put the BODY here.SmtpMail.SmtpServer = "localhost"; //put SMTP SERVER you will use here.SmtpMail.Send(mail); }