title: PHPMailer - attach remote file with URL
body: <p><a href="https://github.com/PHPMailer/PHPMailer">PHPMailer</a> checks <code>is_file</code> for every attachment (in <code>addAttachment</code> function, in <a href="https://github.com/PHPMailer/PHPMailer/blob/master/class.phpmailer.php">class.phpmailer.php</a> file):</p>
  
  <pre><code>if (!@is_file($path)) {
      throw new phpmailerException($this-&gt;lang('file_access') . $path, self::STOP_CONTINUE);
  }
  </code></pre>
  
  <p>My problem is that I can make work <code>is_file</code> only giving full local path to file, not URLs:</p>
  
  <pre><code>is_file('C:/wamp/www/myFolder/rocks.png');      //True
  is_file('http://localhost/myFolder/rocks.png'); //False :(
  </code></pre>
  
  <p>So I can't attach any file from the remote server.</p>
  
  <p>What am I doing wrong?? It can be a permission issue?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I know that there are other ways to check if file exists.</p>
  
  <p>But <code>is_file</code> is in the <a href="https://github.com/PHPMailer/PHPMailer/blob/master/class.phpmailer.php">PhpMailer library</a>, I prefer to not touch it and I want to know if it's possible to make it work using its methods.</p>
  
  <p>Thanks.</p>