title: Incoming email with attachment .pdf extension missing
body: <p>I have this PHP code to attach a document to an email:</p>
  <pre><code>require('./PHPMailer_v5.1/class.phpmailer.php');
  
  $mail = new PHPMailer();
  $mail-&gt;Username = &quot;xxxxx.com&quot;;
  $mail-&gt;Password = &quot;xxxx&quot;;
  $mail-&gt;Host = &quot;smtp.office365.com&quot;;
  $mail-&gt;Mailer = &quot;smtp&quot;;
  $mail-&gt;IsSMTP();
  $mail-&gt;SMTPDebug = 0;
  $mail-&gt;SMTPAuth = TRUE;
  $mail-&gt;SMTPSecure = &quot;tls&quot;;
  $mail-&gt;Port = 587;
  $mail-&gt;SetFrom(&quot;xxxxx.com&quot;, &quot;Pay Slip&quot;);
  $mail-&gt;AddReplyTo(&quot;xxx&quot;, &quot;Pay Slip&quot;);
  $filename = $_SERVER['DOCUMENT_ROOT'] . '/' . 'Payslip/admin/salaryslip' . '/' . $row['year'];
  $fullfilepath='employyee.pdf'
  $filename2 = $filename . '/' . $row['month'] . '/' . $fullfilepath;
     
  $mail-&gt;AddAttachment($filename2, $subject, $encoding = 'base64', $type = 'application/pdf');
  </code></pre>
  <p>The email sends successfully with the attachment, but the <code>.pdf</code> extension is missing in the received mail. Any help would be appreciated.</p>