File attachment in e-mail

giacomino 20 Nov, 2009
Hi,
I have created a form with the upload option:
I need the attachment file goes in the email NOT in the database.
Reading this forum I understand this is possible but I m unable to do that..also I doubt I have the latest version of Chrono form as I cannot find this feature mentioned in on epost :

>>>>

'Yes' in the Email Setup Properties box

>>>>>

Thanks for yr support

Carlo
GreyHead 20 Nov, 2009
Hi Carlo,

This will happen automatically if you have attachments enabled in the Email Setup Properties box.

Bob
giacomino 20 Nov, 2009
Thank you,
the problem is that I m unable to find that parameter.
In my Chrono form panel in admin joomla 1.5 I have the sections called as follows:
General, Setup Emails, Emails Templates, ......
I assume The Email Setup Properties box is in the setup emails but I cannot find the parameter to enalbe attachments.
What I'm doing wrong?
Thank you
Carlo
arvendal 07 Dec, 2009
Hi,
I not sure my question belongs here, but I need to attach a file (PDF) to a reply e-mail to the user who entered some data in a form. The work flow will be like this:

                             --> form data goes to database and administrator
User entering data into form
                             --> reply goes to user with message in e-mail + attached PDF


Is this possible?

Yours
--Mats
GreyHead 07 Dec, 2009
Hi arvendal,

Yes that's certainly possible. You want to send the same pdf file each time?

Add this code to the OnSubmit Before box
<?php
if ( !$mainframe->isSite() ) return;
$form_id = $MyForm->formrow->id;
$MyUploads =& CFUploads::getInstance($form_id);
$MyUploads->attachments[] = 'images/newsletter.pdf';
?>
but change to match your file name and path.

Bob
arvendal 07 Dec, 2009
Thanks!

Oops, this code may be more than a mouthful for my client, since he wants to change PDF-file now and then. Is there a simple way to specify the name of the attached file?

Yours
--Mats
GreyHead 07 Dec, 2009
Hi Mats,

The simple fix for that is to replace the old pdf with a new one having the same name. Then the code will still work.

I'm not sure what the complicated fix is though . . .

Bob
arvendal 07 Dec, 2009
I suppose this is the easiest way.

Thanks for your help!

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