title: C# - How to include Outlook signature in an email that contains images?
body: <p>Here is my code to send the email in Outlook 2013:</p>
  
  <pre class="lang-C# prettyprint-override"><code>public void GenerateEmail(OutEmail outEmail)
  {
      var objOutlook = new Application();
      var mailItem = (MailItem)(objOutlook.CreateItem(OlItemType.olMailItem));
      mailItem.To = outEmail.SendTo;
      mailItem.Subject = outEmail.Subject;
  
      mailItem.RTFBody = outEmail.Body + outEmail.Signature;
      mailItem.Attachments.Add(outEmail.Attachment);
  
      Outlook.Account account = objOutlook.Session.Accounts["mail@email.com"];
      mailItem.SendUsingAccount = account;
      mailItem.Send();
      Console.WriteLine("done");
  }
  </code></pre>
  
  <p>Now, <code>outEmail.Signature</code> contains the HTML of the Outlook signature as a string, found at: <code>C:\Users\SO\AppData\Roaming\Microsoft\Signatures</code> It formats the signature correctly apart from including the images. How can I include the signature with images such that I can create a new signature in Outlook and can include it within the e-mail WITHOUT needing an end user to edit the signature HTML. I don't mind doing it programmatically but I would need to be sure that it would work for all signatures that could be potentially added.</p>
  
  <p><strong>EDIT:</strong> Possible solution? In the HTML, find instances of the <code>img</code> tag and remove the <code>{SignatureName}_FILES\</code> and then attach everything inside the <code>{SignatureName}_FILES\</code> folder to the email?</p>
  
  <p>Cheers.</p>