title: Attaching an email as an attachment to another email
body: <p>I would like to know how to attach an email as an attachment to another email in C#.
  Details:</p>
  
  <ol>
  <li>I am writing a plugin for outlook</li>
  <li>I am getting the error on this line : Attachment attach = new Attachment(mailItem, new System.Net.Mime.ContentType("text/html; charset=us-ascii"));</li>
  <li>Error message is : Cannot create an instance of the abstract class or interface 'Microsoft.Office.Interop.Outlook.Attachment'   </li>
  <li><p>Sample code below</p>
  
  <pre><code>private void button1_Click(object sender, RibbonControlEventArgs e)
  {
      Explorer explorer = Globals.ThisAddIn.Application.ActiveExplorer();
      Selection selection = explorer.Selection;
  
      if (selection.Count &gt; 0)   // Check that selection is not empty.
      {
          object selectedItem = selection[1];   // Index is one-based.
          MailItem mailItem = selectedItem as MailItem;
  
  
          if (mailItem != null)    // Check that selected item is a message.
          {
              System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
              message.To.Add("blah@blah.com");
              message.Subject = "blah";
              message.From = new System.Net.Mail.MailAddress("test@test.com");
              message.Body = "This is the message body";
  
               Attachment attach = new Attachment(mailItem, new System.Net.Mime.ContentType("text/html; charset=us-ascii"));
               message.Attachments.Add(attach);
              System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smlsmtp");
              smtp.Send(message);
  
          }
      }
  }
  </code></pre></li>
  </ol>