title: phpMailer attachment
body: <p>I'm using this to attach files to an mail after uploading them to my server:</p>
  
  <pre><code>for ($i = 0; $i &lt;= 2; $i++)
  {
      $mail-&gt;AddAttachment($locatie.$_FILES['uploaded'.$i]['name'], $_FILES['uploaded'.$i]['name']);
  }
  </code></pre>
  
  <p>Adding attachments is optional, but when the are no files uploaded it gives an error: <strong>Could not access file</strong></p>
  
  <p>How can I prevent this error of showing?</p>