Attach a PDf to email

asecondwill 14 May, 2009
Hi
I want to make a form that collects an email address, and sends out an information pdf to that address. I can upload the pdf to wherever on the server, so its just a case of adding the file to the attachments array.

I know there has been some chat about this here, but none of the threads seem to have a definetive answer. What do i do?

Thanks

Will
asecondwill 14 May, 2009
I have successfully executed self-rescue! can't tell you all how pleased i am to have something actually working in chronoforms! YAY!

inspired by this:

http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=14073#p30807

i did this:

<?php
$MyForm =& CFChronoForm::getInstance('infopack');
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$MyUploads =& CFUploads::getInstance($MyForm->formrow->id);

$MyUploads->attachments[] = '/home/supret/public_html/components/com_chronocontact/uploads/infopack/thegoodstuff.pdf';
?>
GreyHead 14 May, 2009
Hi asecondwill,

Well done, I'm glad it's working for you.

Bob
asecondwill 22 May, 2009
oh no! its mysteriously stopped working again!

no error message. nothing. just no attached form.
asecondwill 22 May, 2009
ok, its cos the file is too big, its 1.6m where do i specify to allow that?
asecondwill 22 May, 2009
nope, its working again, i havn't changed anthing. just renamed the files back again. scary. wonder what wil happen next week.
moriwenne 22 May, 2009
*gets popcorn* 8)

PS: I'm sorry for the bump, I wish i could just get my popcorn without such a disturbance.
This topic is locked and no more replies can be posted.