I would like to create a form that takes basic input from a user. I would like to send this data in the form of a PDF document to another user through an email.
I wanted to find out if there is a way to accomplish this without storing the file on the server.
I got the answer: You can use PHPMailer to do this. The code looks somewhat like this:
$mail = new PHPMailer();
...
$doc = $pdf->Output('', 'S');
$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
$mail->Send();