PHPMailer: Add attachment without uploading the file
I'm using PHPMailer 6.8.1 and I don't want to upload the file (which can be an image, pdf, or a docx) to the server before sending it by email. This call doesn't work: $mail->addAttachment($_FILES['document']['tmp_name'], $_FILES['document']['name']); I get an error thay…