title: CRM Email not formatting HTML via c#
body: <p>I am trying to send n email through crm but with HTML in the Body.  I am sending the email correctly through CRM, but when I open it up (Contact > History) I open the email and see that the body does not have the XML encoded as HTML. Here is what I have so far. My Body of the email is below this code. I've accomplished this using MailMessage() but that will not send it through CRM, only via SMTP. ANy ideas?</p>
  
  <pre><code>var emailTemplateBody = GetEmailTemplateBody();
          var _getEmailVariables = getEmailVariables(emailTemplateBody);
  
          // Create a FROM activity party for the email.
          activityparty fromParty = new activityparty();
          fromParty.partyid = new Lookup();
          fromParty.partyid.type = EntityName.systemuser.ToString();
          fromParty.partyid.Value = new Guid("C82755FB-6369-DB11-98AE-00145E7F535F");
  
          //Create a TO activity party for email
          activityparty toParty = new activityparty();
          toParty.partyid = new Lookup();
          toParty.partyid.type = EntityName.contact.ToString();
          toParty.partyid.Value = new Guid("74CD3907-5BC9-E311-9C41-005056850017");
  
          //Create a new email
          email emailInstance = new email();
  
          //set email parameters
          emailInstance.from = new activityparty[] { fromParty };
          emailInstance.to = new activityparty[] { toParty };
          emailInstance.subject = "Who Cares";
          emailInstance.description = _getEmailVariables;
          emailInstance.mimetype = ""
  
          //Create a GUId for the email
          Guid emailId = _crmServiceInstance.Create(emailInstance);
  
          //Create a SendEmailRequest
          SendEmailRequest request = new SendEmailRequest();
          request.EmailId = emailId;
          request.IssueSend = true;
          request.TrackingToken = "";
  
  
          //Execute request
          _crmServiceInstance.Execute(request);
  </code></pre>
  
  <p>XML code that needs to be in HTML:</p>
  
  <pre><code>"&lt;template&gt;&lt;text&gt;&lt;![CDATA[&lt;p&gt;&lt;font size=2 face=\"Tahoma, Verdana, Arial\"&gt;Hi: |contact.FullName|&lt;/font&gt;&lt;/p&gt;\r\n&lt;p&gt;&lt;font size=2 face=\"Tahoma, Verdana, Arial\"&gt;&lt;/font&gt; &lt;/p&gt;&lt;font size=2 face=\"Tahoma, Verdana, Arial\"&gt;\r\n&lt;ul style=\"list-style-type:disc;white-space:normal;word-spacing:0px;text-transform:none;color:rgb(0,0,0);padding-bottom:0px;text-align:left;padding-top:0px;font:14px/19px 'Helvetica Neue', Arial, Helvetica;padding-left:20px;margin:0px 0px 10px 10px;letter-spacing:normal;padding-right:0px;background-color:rgb(255,255,255);text-indent:0px\"&gt;\r\n&lt;li style=\"list-style-position:outside;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:5px 0px;padding-right:0px\"&gt;Content Line 2 = |New_manheimsubscription.new_externalbillingsubscriptionid| \r\n&lt;li style=\"list-style-position:outside;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:5px 0px;padding-right:0px\"&gt;DogButter is gross&lt;/li&gt;&lt;/ul&gt;&lt;/font&gt;]]&gt;&lt;/text&gt;&lt;/template&gt;"
  </code></pre>