title: Trying to add multiple attachment files with Phpmailer
body: <p>I have two files on my server which i want to join to my mail (generated by tcpdf then by phpmailer), but it doesn't work, the pdf is sent without attachement files. Here is my code : </p>
  
  <pre><code> function SENDmail($pdf) { // $pdf is generated by tcpdf
  $mails = explode (";", $_REQUEST['YOU']);
  
  $files = explode ('&lt;/br&gt;', $_REQUEST['FILES']); //all my files are like 'blabla.png' or 'blabla.pdf' and are separated by &lt;/br&gt;
  
  require_once('phpmailer/class.phpmailer.php');
  $mailer = new PHPMailer();
  $mailer-&gt;IsHTML(true); 
  $mailer-&gt;CharSet = 'UTF-8';
  $mailer-&gt;AddReplyTo($_REQUEST['MAIL'], 'Reply To');
  $mailer-&gt;SetFrom($_REQUEST['MAIL'], $_REQUEST['MAIL']);
  
  foreach ($mails as $mail)
  {
      $mailer-&gt;AddAddress($mail, 'Send To');
  }
  
  foreach ($files as $file)
  {
      $mailer-&gt; AddAttachment('../extension/server/php/files/'.$file); /*Can I put the path like that?*/
  
  }
  $mailer-&gt;Subject = 'blabla';
  $mailer-&gt;AltBody = "To view the message, please use an HTML compatible email viewer";
  
  
  $newline = nl2br($_REQUEST['CONT']);
  $mailer-&gt;Body = $newline;
  
  if ($pdf) {$mailer-&gt;AddStringAttachment($pdf, 'blabla on '.date('l jS \of F Y').'.pdf');}
  
  $mailer-&gt;Send();
  }
  
  
  
  $attachment = $pdf-&gt;Output('blabla on '.date('l jS \of F Y').'.pdf', 'S');
  SENDmail($attachment);
  </code></pre>
  
  <p>Thanks</p>