Adding a html file into a c# email app

Posted by neilos on Stack Overflow See other posts from Stack Overflow or by neilos
Published on 2010-06-05T16:13:53Z Indexed on 2010/06/05 16:22 UTC
Read the original article Hit count: 134

Filed under:
using System;
using System.Net;
using System.Net.Mail;

class MainClass
{
    public static void Main(string[] args)
    {
        SmtpClient client = new SmtpClient("192.168.1.12", 25);


        using (MailMessage msg = new MailMessage())
        {
            msg.From = new MailAddress("[email protected]");
            msg.Subject = "***Dexter DB***";

            msg.Body = "***DB backup done***"; // I want to change this so i can do this in html file - how do i pick up this file and send a html form?

            msg.To.Add(new MailAddress("[email protected]"));
            client.Send(msg);
        }
    }
}

© Stack Overflow or respective owner

Related posts about c#