Sending Email:
NameSpace:
using System.Net.Mail;
Coding:
MailMessage om = new MailMessage("suthahar@gmail.com", "jssuthahar@gmail.com");
//om.CC
// om.Bcc
om.Subject = "Welcome to Suthahar bogs";
om.Body = value;
om.IsBodyHtml = true;
om.Priority=MailPriority.High;
SmtpClient os=new SmtpClient();
os.Host = "smtp.gmail.com";
os.Credentials=new System.Net.NetworkCredential("suthaharmcpd@gmail.com","*******");
os.EnableSsl = true;
os.Send(om);
Response.Write("<script>alert('mail send')</script>");
No comments:
Post a Comment