I generate PDF’s using FPDF and I need to email it to a customer.
Since I can generate the PDF’s from the DB, I don’t want to save all the PDF’s locally as it will clutter up my server.
I want to be able to send an email with a PDF attached. Do I need to create a temporary file, then delete it every time or is there another way to do it?
you will notice this line
$attachment = chunk_split(base64_encode(file_get_contents('attachment.zip')));and you change to suit your in memory file.