Forums

Chronoforms v5 static file attachment

van Ginneken 16 Jan, 2014
I need to send an attachment to an email. The attachment is always the same file. It has been uploaded to the server. But somehow, it doesn't work. Is this possible or is it only possible to attach files that have been uploaded?
Thanks!
GreyHead 16 Jan, 2014
Hi van Ginneken,

Please see this FAQ which has a solution for CFv4, it may be possible to adapt this for CFv5, so far I haven't had time to test it.

Bob
ChDUP 05 Jun, 2014
Hi GreyHead.
I have the same question about add a static file attachment to CFv5.
Your solution for CFv4 is including the CFv4 Email [GH] action.
How to install it ?
If I try to install like an extension, I have an error : "JInstaller: :Install: no XML file"

Thanks !
Max_admin 05 Jun, 2014
v5 version:
https://www.chronoengine.com/faqs/70-cfv5/5224-how-can-i-attach-files-from-my-server-to-an-email-in-cfv5.html
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ChDUP 05 Jun, 2014
Thanks Max Payne !
Email [GH] action not needed ?

I will try to change this code to send an attachment depending on a select input in my form.
Max_admin 05 Jun, 2014
No, this code should work with the default Email action!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ChDUP 06 Jun, 2014
Answer
This is my code.
It works.
<?php

$files = array (
1 => 'pdf1',
2 => 'pdf2',
3 => 'pdf3'
);

$formation=$form->data['formation'];
$attachment = $files[$formation];
$form->files["candidature"]["path"] = JPATH_SITE."/pdf/".$attachment.'.pdf';
BNRBranding 08 Aug, 2014
1 Likes

v5 version:
https://www.chronoengine.com/faqs/70-cfv5/5224-how-can-i-attach-files-from-my-server-to-an-email-in-cfv5.html



This works perfectly.
GreyHead 08 Aug, 2014
Hi ChDUP,

For future reference, you install actions using the Install Action icon in the ChronoForms Forms Manager toolbar but the Email [GH] action is only available for CFv4 at present.

Bob
This topic is locked and no more replies can be posted.