string to = "[email protected]";
string body = "Test";
SmtpClient SMTPServer = new SmtpClient("127.0.0.1");
MailMessage mailObj = new MailMessage(urEmail, to, subject, body);
SMTPServer.Send(mailObj);
This is how i am currently sending a test email. How do i make this html and be able to make the email sent out look better by adding images etc?
Thanks
On the MailMessage
set the property IsBodyHtml
to true.
string to = "[email protected]";
string body = "Test";
SmtpClient SMTPServer = new SmtpClient("127.0.0.1");
MailMessage mailObj = new MailMessage(urEmail, to, subject, body);
mailObj.IsBodyHtml = true; // This line
SMTPServer.Send(mailObj);