Hi there,
I'm using Joomla 3.9 + CF5.
I'm trying to send an email post form to submit, but using a file already existing on the server (no upload file needed).
Any ideas?
I cannot able to understand how to set the setup...
I created a hidden type called "filepdf" and i need to put it in a file attachment on email settings...
Thanks in advance.
Andrea
Just put the filepath directly in the email attachment settings, right?
Just put the filepath directly in the attachment file setting, don't put it in a hidden input. That's a terribly stupid way of doing it, because I could press F12, replace it with a different filepath, and download any file on your server I want.
Where exactly? I cannot see this kind of settings.
Could you kindl give me an example?
Where you put {filepdf} put a full path to your file instead
I tried to put this > variazioni_mensili/420/20170308163609-DI GIUSTO MIRKO-MODULI SINDACATI-2017Febbraio.pdf but it'doesnt work.....
Obiuvsly, the address is correct (i mean, if i put the code in the bar address i'm able to see the document)
No it's not obvious. Needs to be a FILE PATH not a URL
Hi, solved the issue in this way:
<?php
$path = JPATH_SITE.'/'.$_POST['filepdf'];
$form->files['allegato']['path'] = $path;
?>
Follow the istructions from https://www.chronoengine.com/faqs/70-chronoforms/cfv5/5224-how-can-i-attach-files-from-my-server-to-an-email-in-cfv5
Thanks
Again if you do that, you will let a person download any file they want from your server.
Just echo JPATH_SITE.'/'.$_POST['filepdf']; and that should give you thge file path you're after
OK I see my confusion. You should follow the very first piece of code on that FAQ.
Don't worry. Thanks for your help anyway