title: Add multiple images in the email body (inline)using c# windows application
body: <p>I searched for this several times and found solutions,but all supports only one image.Finally I used this code.
  But  the problem is,if the html contain more than one image only one image is shown in the body and the others will come as attachment.</p>
  
  <pre><code>string inputHtmlContent = htmlbody;
  string outputHtmlContent = string.Empty;
  var myResources = new List&lt;LinkedResource&gt;();
  
  if ((!string.IsNullOrEmpty(inputHtmlContent)))
  {
    var doc = new HtmlAgilityPack.HtmlDocument();
    doc.LoadHtml(inputHtmlContent);
    HtmlNodeCollection nodes = doc.DocumentNode.SelectNodes("//img");
    if (nodes !=null)
    {
      foreach (HtmlNode node in nodes)
      {
        if (node.Attributes.Contains("src"))
        {
          string data = node.Attributes["src"].Value;
          string imgPath = Application.StartupPath+"\\"+data;
          var imgLogo = new LinkedResource(imgPath);
          imgLogo.ContentId = Guid.NewGuid().ToString();
          imgLogo.ContentType = new ContentType("image/jpeg");
          myResources.Add(imgLogo);
          node.Attributes["src"].Value = string.Format("cid:{0}", imgLogo.ContentId);
          outputHtmlContent = doc.DocumentNode.OuterHtml;
        }
      }
    }
    else
    {
      outputHtmlContent = inputHtmlContent;
    }
    AlternateView av2 = AlternateView.CreateAlternateViewFromString(outputHtmlContent,
                              null, MediaTypeNames.Text.Html);
    foreach (LinkedResource linkedResource in myResources)
    {
      av2.LinkedResources.Add(linkedResource);
    }
  
    msg.AlternateViews.Add(av2);
  </code></pre>
  
  <p>Please help me to resolve this,How to show all images inside email body?...</p>