How to send Html Email using c#?

SmtpClient client = new SmtpClient(“smtp.gmail.com”);
client.Credentials = new NetworkCredential(“your@gmail.com”, “password”);

MailMessage message = new MailMessage(“your@gmail.com”,
                               “reciever@someemail.com”,
                               “Testing Html Email”,
                               “<h1>Your Email Content</h1>”);

message.IsBodyHtml = true;
client.Send(message);

Leave a Reply

Your email address will not be published. Required fields are marked *