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

How to Get an Free Azure Subscription for Learning

Whether you're a student, beginner, or professional looking to upskill with Microsoft Azure, here are 3 ways to get started with zero ...

MSDEVBUILD - English Channel

MSDEVBUILD - Tamil Channel

Popular Posts