title: Send attachment file using PHPMailer
body: <p>Here my code that using PHPMailer to send attachment via mail using PHPMailer. I try this out in localhost it function perfectly. But once I upload to my server, the attachment is not sent.</p>
  
  <pre><code>$email = new PHPMailer();
  $email-&gt;From      = 'john@hotmail.com';
  $email-&gt;FromName  = 'John';
  $email-&gt;Subject   = 'Message Subject';
  $email-&gt;Body      = 'test';
  $email-&gt;AddAddress( 'william@hotmail.com' );
  
  $file_to_attach = $_FILES["cv"]["tmp_name"];
  
  $email-&gt;AddAttachment( $file_to_attach , $_FILES["cv"]["name"]);
  
  return $email-&gt;Send();
  </code></pre>
  
  <p>I cant receive my attachment file and I upload.</p>
  
  <p>Did I miss out any code..?</p>