File attachment with PHPMailer
When you call move_uploaded_file($file_tmp,”uploads/”.$file_name); This creates a file in the uploads/ directory with the name of the file as it was named on the uploader’s computer. Then you used sample code to add the attachment to phpMailer so you’re basically attempting to attach non-existent files. These two lines: $mail->addAttachment(‘uploads/file.tar.gz’); // I took this from the … Read more