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.
$email = new PHPMailer();
$email->From = 'john@hotmail.com';
$email->FromName = 'John';
$email->Subject = 'Message Subject';
$email->Body = 'test';
$email->AddAddress( 'william@hotmail.com' );
$file_to_attach = $_FILES["cv"]["tmp_name"];
$email->AddAttachment( $file_to_attach , $_FILES["cv"]["name"]);
return $email->Send();
I cant receive my attachment file and I upload.
Did I miss out any code..?