{
System.Net.Mail.MailMessage obj = new System.Net.Mail.MailMessage();
String message =@ "
// for sending html contents
obj.IsBodyHtml = true;
obj.BodyEncoding = System.Text.Encoding.UTF8;
obj.Subject = txtNature.Text ;
obj.From = new System.Net.Mail.MailAddress("From Address");
obj.To.Add("To Address")
obj.Body = message;
System.Net.Mail.SmtpClient cli = new System.Net.Mail.SmtpClient();
cli.Host = "host IP or host address";//can give localhost
cli.Send(obj);
}
catch (Exception ex)
{
}
No comments:
Post a Comment