title: Action Mailer MVC3 and Inline Image
body: <p>CI am using MVC.ActionMailer to send emails from my website. I am having issues with embedding an inline image into the email.</p>
  
  <p>Here is my Controller Action</p>
  
  <pre><code>public EmailResult WelcomeEmail()
      {
          WelcomeMailVM welcomeDetails = new WelcomeMailVM()
          var path = HttpContext.Current.Server.MapPath("~/Content/images/myImage.png");
          Attachments.Add("myImage.png", System.IO.File.ReadAllBytes(path));
          //Attachments.Inline["holidaymate.png"] = System.IO.File.ReadAllBytes(path);
          To.Add("someEmail@test.com");
          From = "noreply@myDomain.com";
          Subject = "Welcome to My Site;
          return Email("WelcomeEmail", welcomeDetails);
      }
  </code></pre>
  
  <p>and the view for the email</p>
  
  <pre><code>@model HolidayMate.API.ViewModels.Mail.WelcomeMailVM
  @using ActionMailer.Net.Mvc
  
  @{
       Layout = "~/Views/Shared/_MailLayout.cshtml";
   }
   &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  
   &lt;table cellpadding="0" cellspacing="0" border="0" id="backgroundTable"&gt;
   &lt;tr&gt;
      &lt;td style="width:300px"&gt;
          @Html.InlineImage("myImage.png")
      &lt;/td&gt;
      &lt;td style="width:300px"&gt;
          &lt;table cellpadding="0" cellspacing="0" border="0"&gt;
              &lt;tr&gt;
                  &lt;td&gt;Date&lt;/td&gt;
                  &lt;td&gt;@DateTime.Now.ToString("dd MMMM yyyy")
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The email sends perfectly. But the image is not displayed in the email. I get this issue with gmail and with thunderbird. Unfortunately I do not have outlook to test on. When googling i found the following</p>
  
  <p><a href="https://bitbucket.org/swaj/actionmailer.net/issue/38/inline-images-are-not-displayed-in" rel="nofollow">#38 Inline images are not displayed in Thunderbird</a></p>
  
  <p>But i am not sure where to send the content type for the email. Please any help would be greatly appreciated.</p>