Can't setup attachment to the email form plugin

Status
Not open for further replies.

lcollong

FabriKant d'applications web
Hi,

I've just updated this J2.5 site to the last "master" github version. I'm using the email form plugin to send a mail upon form submit. It's working except the attachment part. What ever I put in the "Attachments (eval)" field (also a bit "small" :) ) such as : return (array) '{mytable___myUploadElement_raw}', it sends the mail without any attachment. Of course the placeholder shows the right filename and path if I put :
Code:
$test = (array) '{mytable___myUploadElement_raw}';
var_dump($test);exit;
Making some debug, it seems that the following line (around 497 of email.php) is always returning false. Whatever I put in the field. Even a constant.
Code:
                            $file = $elementModel->addEmailAttachement($v);
I have not been able to find where addEmailAttachement is defined.....
 
Making some debug, it seems that the following line (around 497 of email.php) is always returning false.
its only defined for the fileupload element, but the email form plugin tests for that so you shouldn't have an issue with that.
Can you show what settings you have and what you want to attach. The 'Attach as PDF' option is distinct from the other two attachment options. I'm wondering if with the settings you have there is something
Also is your Joomla tmp folder writable?
 
Yes indeed, the tmp folder is writable. Here is my email plugin setup (capture.jpg). The attachments (eval) fields contains the following :
Code:
return (array) '{fk_factures___invoice_pdf_raw}';
This element is a fileupload one. The database contains : "/images/factures_prestataires/FA0484_-_EcoVoyageur_-_Acompte_1_-_Intranet_Fabrik.pdf"
Also strange : the form view on edit does not show the filename uploaded but the detailed one yes.
notice : the two other options (attachment type and attach as PDF) are working.
The mail is received with the right data (using article template including placeholders).
 

Attachments

  • Capture.JPG
    Capture.JPG
    45.9 KB · Views: 733
I think all you need to do is set the element to:
'Email uploaded file to recipients' = yes
No need to mess with the email plugins' options
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top