Sending Email using gmail

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>");



0 Comments

Featured Post

Azure AI Service, Studio, ML & Foundry – Which One Do You Need?

If you have used Microsoft AI tools in the past, you might remember popular services like Cognitive Services and the Bot Framework. These to...

MSDEVBUILD - English Channel

MSDEVBUILD - Tamil Channel

Popular Posts