file upload to email?

katandmouse 03 Jun, 2010
Is there a way to make the file upload send as an attachment to the email that is being sent? Or how can I make it create a link to it?

If not, how do I let the recipient know there is a file that was uploaded?
GreyHead 03 Jun, 2010
Hi katandmouse,

Yes, set 'Enable Attchments' to 'Yes' in the Email Setup | Properties box.

Bob
katandmouse 03 Jun, 2010
Thanks. That setting is set already and it's not working. I downloaded your tutorial and followed it. Is there something on the server perhaps? Permissions, maybe?

So, are you saying the file upload will go online and be sent as an attachment?

Thanks again.
Kathy
katandmouse 03 Jun, 2010
I should clarify. I don't think the file is uploading at all. It's not on the server. So maybe that's where I should start to troubleshoot this. I followed instructions in the tutorial. What else do I need? Thanks.
GreyHead 03 Jun, 2010
Hi katandmouse,

Please turn on Debug on the Form general tab then submit the form and post the result here.

Bob
katandmouse 04 Jun, 2010
Here you go. I see an error there. Not sure how to fix that.

Thanks for your help. I love this extension and will be purchasing it after I get it all working.

1. Form passed first SPAM check OK
2. Form passed the submissions limit (if enabled) OK
3. Form passed the Image verification (if enabled) OK
4. Form passed the server side validation (if enabled) OK
5. $_POST Array: Array ( [part1] => [mfg1] => [qty1] => [target1] => [rohs1] => yes [type1] => immediate [part2] => [mfg2] => [qty2] => [target2] => [rohs2] => yes [type2] => immediate [part3] => [mfg3] => [qty3] => [target3] => [rohs3] => yes [type3] => immediate [part4] => [mfg4] => [qty4] => [target4] => [rohs4] => yes [type4] => immediate [file-to-come] => No [firstname] => Kathy [lastname] => long [cb_title] => Purchasing/Buyer [email] => [email]ss@katandmouse.com[/email] [cb_company] => kat & Mouse [cb_businesstype] => OEM [cb_phonenumber] => 8313352152 [cb_url] => http://www.katandmouse.com [cb_streetaddress] => 5 Erba Lane Ste. G [cb_streetaddress2] => [cb_city] => Scotts Valley [cb_state] => CA [cb_zipcode] => 95070 [cb_usa] => USA [recaptcha_challenge_field] => 02ZlMRe7aY4rvIIDS8SgI6nqEw87Fu9T4rudykpa4FSOwe9M8ixxi9y4GUm27BpgCskNLzbEUaLwYSPO4HDegrAiUFYNNPcsNc58eKECmCCHx64_fDi64fhJGZ4tDHh2Pg4A0EFTZ-fcJ6R_aCe0JqBrPa72NbCaY64OCt23STyNsVCnQMFD9zjcq3pf2oIh7Gr8e6g3zyIQ59R99X_ovOtCO-s-dMEvnEj3EEmnAj8Cuu8lm_l37oW3sidDaE_5Nj0tolJv1NmnJez4QvImbujjOUgiYB [recaptcha_response_field] => kupat stumps [c4e4604d60077c0aa282105cc80c8641] => 1 [1cf1] => c838ac307376e0d687d236dbd0f4a4cd [chronoformname] => QuoteRequest )
6. $_FILES Array: Array ( [file_0] => Array ( [name] => params2.txt [type] => text/plain [tmp_name] => /tmp/phpcAuMUf [error] => 0 [size] => 3703 ) )
7. Form passed the plugins step (if enabled) OK
8. An email has been SENT successfully from (Web Request From)sales@accesselectroniccomponents.com to [email]blahblah@katandmouse.com[/email]
9. Debug End
preciousone0510 04 Jun, 2010
There's a button that says enable attachments, click that so you can upload files
GreyHead 04 Jun, 2010
Hi katandmouse,

Looks as though you haven't configured the File Uploads on the Form File Uploads tab. (I think that there is a tutorial from the link above that might help with the settings.)

Bob
katandmouse 04 Jun, 2010
Hi,
First thing I did was download the tutorial on setting up file uploads and followed the instructions to the letter I believe. Under the File Uploads tab, it IS set to enable uploads. Under the Setup Emails tab, both emails there ARE set to enable attachments.

The error appears to be in the tmp folder. Perhaps there is a permission problem and the tmp folder is not being created and maybe it is, but I can't write to it???

Any ideas?

thanks.
Kathy
nml375 04 Jun, 2010
Hi Kathy,
The debug output shows that the file is successfully uploaded to the tmp-directory (done by PHP prior running the Joomla or CF scripts), and contains 3703 bytes of data.

However, the process responsible for testing and moving the file to the uploads-directory is not run. Could you post the exact data you entered in the "Field names/allowed extensions/sizes(KB)" field of the "File Uploads" tab? Or even better, post a screenshot of the whole tab?

/Fredrik
lennyortiz 04 Jun, 2010
I'm having the same exact problem. I'll be following this thread for more information when somebody has it.
katandmouse 04 Jun, 2010
Here's the screenshot. THANKS!
nml375 04 Jun, 2010
Hi Kathy,
The problem is that you've used 'upload' as the name of the upload input in your "Field names/..." setup, yet in your form, you've called the actual input "file_0". These must match.

Either rename the file upload input, or change the config string into this:
file_0:pdf|doc|xls|txt|cvc{5000-1}


/Fredrik
katandmouse 14 Jun, 2010
Well, there you go. There's the answer. Duh. Thanks!
Mgringo 27 Jul, 2010
Hi,
same problem here. Gives an error after submit:

Warning: file_put_contents(/xxx/xxx/xxx/images/stories/index.html) [function.file-put-contents]: failed to open stream: Permission denied in /xxx/xxx/xxx/libraries/joomla/filesystem/file.php on line 298

This is the code:
$ret = file_put_contents($file, $buffer);

Anybody ...????
GreyHead 27 Jul, 2010
Hi Mgringo,

The Joomla user (in server-speak) doesn't have the necessary permissions to create a file in the temporary folder. Try chmodding the folder to 755 or 777.

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