Attach pdf to email

Attach a PDF file to an email in ChronoForms.

Overview

The issue occurs when the file path is correctly set but the attachment field in the email event does not send the file.
Follow the official guide for attaching created files to emails, ensuring the attachment field references the correct data array structure.

Answered
en enzo.orsi 21 Feb, 2017
I am getting crazy, with something very very easy.

$form->data['firmato_email']['path'] = JPATH_SITE . "/blablabla/" . $form->data['agg_pdf_firmato']['cf_pdf_file_firmato'];
$form->data['firmato_email']['name'] = $form->data['agg_pdf_firmato']['cf_pdf_file_firmato'];
$form->data['firmato_email']['link'] = JURI::root() . "images/firma_digitale/documenti_firmati/" . $form->data['agg_pdf_firmato']['cf_pdf_file_firmato'];



This is the debug:

    [firmato_email] => Array
        (
            [path] => /home/blablabla/50659a85f45eCYaDY7N9tjmDuiiNgq2V.pdf
            [name] => 50659a85f45eCYaDY7N9tjmDuiiNgq2V.pdf
            [link] => http://www.blablabla.it/blablabla/50659a85f45eCYaDY7N9tjmDuiiNgq2V.pdf


The links are correct...but if I add "firmato_email" in the field attachment of email events, it is not sending it.
Don't understand why, and I am sure it is something simple...๐Ÿ˜Ÿ
en enzo.orsi 21 Feb, 2017
Answer
1 Likes
Solved with this:

https://www.chronoengine.com/faqs/3160-how-can-i-attach-a-file-i-have-created-to-an-email

Thank you!!
This topic is locked and no more replies can be posted.