title: Sending html page as message body of email in asp.net c#
body: <p>I have written the below code to send an email wherein the message body is a html page.
  I don't get any error when i run this code but do not get any mail. I tried putting body as simple message string then i received the email but not as message body as html page.
  What is going wrong? please help.</p>
  
  <pre><code>    protected void btnSend_Click(object sender, EventArgs e)
      {
          SendHTMLMail();
      }
  
      public void SendHTMLMail()
      {
          //var path = Server.MapPath("~/test/HTMLPage.htm");
          StreamReader reader = new StreamReader(Server.MapPath("~/expo_crm/test/HTMLPage.htm"));
          string readFile = reader.ReadToEnd();
          string myString = "";
          myString = readFile;
  SmtpClient smtp = new SmtpClient
          {
              Host = "mail.abc.com", // smtp server address here…
              Port = 25,
              EnableSsl = false,
              DeliveryMethod = SmtpDeliveryMethod.Network,
              Credentials = new System.Net.NetworkCredential("abc@xyz.com", "xxxx"),
              Timeout = 30000,
          };
          MailMessage message = new MailMessage("abc@xyz.com", "akshata@gmail.com", " html ", myString);
          message.IsBodyHtml = true;
          smtp.Send(message);
      }
  </code></pre>