title: How to send a list as email?
body: <p>in my wpf application i need to send an email and the body of the list i need to send a list of items.Now everything works fine except that the body is not rendred to the format that i wrote in my code.
  This is the function that send an email:</p>
  
  <pre><code>public static void CreateTimeoutTestMessage(string ParentAdress, List&lt;KidHistory&gt; list,Parent p,Enfant e)
      {
  
          var fromAddress = new MailAddress("famissima.mic@gmail.com", "famissima.mic");
          var toAddress = new MailAddress(ParentAdress);
          const string fromPassword = "xxxxxxxxxx";
          const string subject = "Subject";
          var smtp = new SmtpClient
          {
              Host = "smtp.gmail.com",
              Port = 587,
              EnableSsl = true,
              DeliveryMethod = SmtpDeliveryMethod.Network,
              UseDefaultCredentials = false,
              Timeout = 20000,
              Credentials = new NetworkCredential(fromAddress.Address, fromPassword)
          };
          var message = new MailMessage(fromAddress, toAddress);
          message.Subject = subject;
          if (p.Civilite == "Mr")
              message.Body += "Bonjour Mr. " + " " + p.Nom + " " + p.Prenom + " ,l'historique de navigation de votre enfant " + e.pseudo + " est: ";
          else
              message.Body += "Bonjour M. " + " " + p.Nom + " " + p.Prenom + " ,l'historique de navigation de votre enfant " + e.pseudo + " est: ";
          message.Body += "&lt;table width='100%' style='border:Solid 1px Black;'&gt;";
          foreach (var item in list)
          {
              message.Body += "&lt;tr&gt;";
              message.Body += "&lt;td stlye='color:blue;'&gt;" + item.url + "&lt;/td&gt;" + "&lt;td stlye='color:blue;'&gt;" + item.StartDate + "&lt;/td&gt;" + "&lt;td stlye='color:blue;'&gt;" + item.FinishDate + "&lt;/td&gt;";
              message.Body += "&lt;/tr&gt;";
          }
          message.Body += "&lt;/table&gt;";
          smtp.Send(message);
      }
  </code></pre>
  
  <p>and this is the output(the received mail):
  <img src="https://i.stack.imgur.com/klGvr.png" alt="the result"></p>