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
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?
Hi,
thanks for your reply.
I've tried to to this but unfortunately didn't work.
CF5 EMAIL SETTINGS: Attachment File > {filepdf} or without {}
The code in Custom:
$filepdf is the address where the file is stored.
Any ideas?
thanks for your reply.
I've tried to to this but unfortunately didn't work.
CF5 EMAIL SETTINGS: Attachment File > {filepdf} or without {}
The code in Custom:
<div class="gcore-input gcore-display-table" id="fin-filepdf"><input type="hidden" id="filepdf_ghost" data-ghost="1" value="<?php echo $filepdf; ?>" class="form-control A" name="filepdf" />
<input name="filepdf" id="filepdf" class="form-control gcore-height-auto A" title="" style="" multiple="0" data-load-state="" data-tooltip="" type="file" /></div></div>
$filepdf is the address where the file is stored.
Any ideas?
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?
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)
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
Sorry, i'm not an expert..
How can i discover the file path from the address?
If i take a look to the folder, the PATH is exactly the same.

How can i discover the file path from the address?
If i take a look to the folder, the PATH is exactly the same.

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
<?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
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
This topic is locked and no more replies can be posted.