Mar 11th, 2015, 9:27 AM
I did that by using fpdf library. In the email template i have included PHP code that creates PDF, stores it in a temporary file and then attaches it to the mail.
Example of the HTML Template for the mail:
{php}
global $fields;
require ('path/scripts/fpdf17/fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output('temp/form.pdf');
{/php}
{$attachment file="/temp/form.pdf"}
<p>
Thanks for your submission!
</p>
Example of the HTML Template for the mail:
{php}
global $fields;
require ('path/scripts/fpdf17/fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output('temp/form.pdf');
{/php}
{$attachment file="/temp/form.pdf"}
<p>
Thanks for your submission!
</p>