protected void sendEmail(string address, string subject, string from, string body)
{
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(address);
message.Subject = subject;
message.From = new System.Net.Mail.MailAddress(from);
message.Body = body;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
smtp.Credentials = new System.Net.NetworkCredential("host", "password");
smtp.Port = 587;
smtp.Send(message);
}