My sample coding to create pdf using mpdf is, (it works fine)
<? require_once('../mpdf.php');
$mpdf = new mPDF();
$mpdf->WriteHTML('<p>Your first taste of creating PDF from HTML</p>');
$mpdf->Output();
exit;
?>
My sample coding to send email:
$em =//email address ;
$subject = //subject;
$message = //message;
mail($em, $subject, $message, "From: MyDomain Webmaster<admin@mydomain.com>\nX-Mailer: PHP/" . phpversion());
My problem is that the pdf is created and is opened in the browser directly, how can send the pdf file as email attachment?
If possible please help me with the code or just help me with some suggestions, I will code it myself.
Thanks!