title: Why is my image not showing in the email?
body: <p>I have an ecard application that allows a user to pick an image and send an email. But I am not able to figure out how to send the email here is my code.</p>
  
  <pre><code>protected void SendEmail()
  {
      StringBuilder message;
      Attachment attachFile;
      string sImage = System.Web.HttpContext.Current.Server.MapPath("~/DesktopModules/KDMC_EcardList/images/" + txtCapture.Text);
      LinkedResource yourPictureRes = new LinkedResource(txtCapture.Text, MediaTypeNames.Image.Jpeg);
      yourPictureRes.ContentId = "YourPictureId";
      altView.LinkedResources.Add(yourPictureRes);
      //Internal Message
      message = new StringBuilder();
      message.AppendLine(@"&lt;p&gt;&lt;img src=cid: sImage /&gt;&lt;/p&gt;");
      message.AppendLine(@"&lt;pre&gt;&lt;table style='width:650px; word-break:break-word; height:auto;'&gt;
                               &lt;/td&gt;&lt;tr&gt;&lt;td style='width:150px;'&gt;From: &lt;/td&gt;&lt;td style='width:500px;'&gt;" + txtFName.Text + " " + txtLName.Text + @"
                              &lt;/td&gt;&lt;tr&gt;&lt;td&gt;To: &lt;/td&gt;&lt;td&gt;" + txtFriendFName.Text + " " + txtFriendLName.Text + @"
                              &lt;/td&gt;&lt;tr&gt;&lt;td&gt;Room Number: &lt;/td&gt;&lt;td&gt;" + txtRoom.Text + @"
                             &lt;/td&gt;&lt;tr&gt;&lt;td&gt;Message: &lt;/td&gt;&lt;td&gt;" + txtMessage.Text + @"                                 
                             &lt;/td&gt;&lt;tr&gt;&lt;td&gt;Date Sent: &lt;/td&gt;&lt;td&gt;" + DateTime.Now.ToString() + "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/pre&gt;");
  
      //attachFile = new Attachment(FileUploadVideo.PostedFile.InputStream, strFileName);
      System.Threading.Thread.Sleep(1000);
      // need to create new reference to attachment, cannot use same reference to send email twice
      //attachment = new Attachment(theMemoryStream, strSubject);
      Mail.SendMail("test@test.net", "test@test.net", "", "test@test.net",
              "test@test.net", MailPriority.Normal, "A new Ecard has been submitted", MailFormat.Html, Encoding.UTF8, message.ToString(),
              new List&lt;Attachment&gt;() { }, null, null, null, null, Host.EnableSMTPSSL);  
  }
  </code></pre>
  
  <p>I tried to follow the example here <a href="https://stackoverflow.com/questions/25139157/c-sharp-add-image-to-email-body">C# add image to email body</a> as well as other solutions in the community but I am still unable to find a solution.</p>