title: Adding embedded images within mail body phpmailer class
body: <p>Im trying to embed an image within my message body but it ends up as an attachment</p>
  
  <pre><code>    $mailer-&gt;Subject = APP_NAME . " - " . $name . " send you and Ad : " . $row['name'];
      $mailer-&gt;IsHTML(true);
      $mailer-&gt;AddEmbeddedImage('../images/namDiams.png', 'logoimg', 'namDimes.png'); 
  
      //footer
      $footer = "Regards&lt;br/&gt;&lt;br/&gt;";
      $footer .= '&lt;table style="width: 95%"&gt;';
      $footer .= '&lt;tr&gt;';
      $footer .= '&lt;td&gt;';
      $footer .= "&lt;strong&gt;&lt;span style='font-size: 15px'&gt;NamDimes Team&lt;/span&gt;&lt;/strong&gt;&lt;br/&gt;
                      NamDimes&lt;br/&gt;
                      Contact Number: " . APP_CONTACT . "&lt;br/&gt;
                      Email: " . APP_EMAIL . "&lt;br/&gt;
                      Website: " . APP_WEBSITE . "&lt;br/&gt;";
      $footer .= '&lt;/td&gt;';
      $footer .= '&lt;td style="text-align:right"&gt;';
      $footer .= '&lt;img src=\"cid:logoimg\" /&gt;';
      $footer .= '&lt;/td&gt;';
      $footer .= '&lt;/tr&gt;';
      $footer .= '&lt;/table&gt;';
  
      $mailer-&gt;Body = $body . $footer;
      $mailer-&gt;AltBody="This is text only alternative body.";
      $mailer-&gt;AddAttachment('../' . $row['image_path'], $row['name'] . ".jpg");
  </code></pre>
  
  <p>i have set everything else, including the addresses, the mail gets send out, logo image that I want embed in the body gets attached as an attachment, anyone know why?</p>