title: PHPMail sending attachment but they are empty
body: <p>Basically, I am trying to send a PDF via PHPMail.
  the email is sent and I receive it in outlook perfectly. the problem is that the attachment is broken and it doesnt open. I even tried sending a HTML and is also empty. </p>
  
  <p>I tried researching in the forum, tried several "working codes" and other people got it working with this code... I have no clue why is not working for me.
  I am using the lastest version of PHPMail 5.2.2</p>
  
  <pre><code>$mail = new PHPMailer();
          $staffEmail = "staffemail";
          $mail-&gt;From = $staffEmail;
          $mail-&gt;FromName = "name";
          $mail-&gt;AddAddress('my@email.com');
          $mail-&gt;AddReplyTo($staffEmail, "name");
  
          $mail-&gt;AddAttachment('test.pdf');
          $mail-&gt;Subject = "PDF file attachment";
  
          $mail-&gt;Body = "message!";
          $mail-&gt;Send();
  </code></pre>