I am using code from this website to convert html code to a PDF:
I have found this code to send the pdf by email, but not sure how to use it:
$mail = new PHPMailer();
$doc = $pdf->Output('', 'S');
($doc, 'doc.pdf', 'base64', 'application/pdf');
Can you please demonstrate to me with sample code.
i.e. Instead of opening the PDF it send via email from a form submission?