I am currently trying to generate a pdf with FPDF and then send it in an email with PHPMailer. I know that the PHPMailer functionality is working, and I can create the pdf. But
If you need to save file and send, use this.
$file = basename("test"); //create file $file .= '.pdf'; //change extension of file to .pdf $pdf->Output($file, 'F'); //save file ..... $mail->AddAttachment("test.pdf"); //add attachment
take care of file location.