Hi,
I have a problem with attaching a file from my server to an e-mail.
I used http://www.chronoengine.com/faqs/70-cfv5/5224-how-can-i-attach-files-from-my-server-to-an-email-in-cfv5.html
but I can't get it to work:
1. I don't know what or where JPATH_SITE is.
2. My document is in my Wordpress content directory.
Thanks for any help.
Custom code:
Debug info:
I have a problem with attaching a file from my server to an e-mail.
I used http://www.chronoengine.com/faqs/70-cfv5/5224-how-can-i-attach-files-from-my-server-to-an-email-in-cfv5.html
but I can't get it to work:
1. I don't know what or where JPATH_SITE is.
2. My document is in my Wordpress content directory.
Thanks for any help.
Custom code:
<?php
$path = '/wp-content/uploads/2016/03/';
$form->files['field_name']['path'] = $path.'checklist.doc';
?>
Debug info:
Data Array
Array
(
[page] => Chronoforms5
[chronoform] => Aanvragen_informatie
[event] => submit
[Naam] => roald
[Telefoonnummer] => 0123456789
[Email] => xx@gmail.com
[captcha] =>
[verzend] => Vraag aan
[ip_address] => 193.xx.xx.xx
)
Array
(
[field_name] => Array
(
[path] => /wp-content/uploads/2016/03/checklist.doc
)
)
Errors
Array
(
)
Debug Info
Array
(
[7] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully:
[1] => To:xx@gmail.com, xx@xxx.nl
[2] => Subject:Bedankt voor uw aanvraag
[3] => From name:xx
[4] => From email:xx@xx.nl
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:
[9] => Attachments:
[10] => Array
(
)
[11] => Body:
<p>text</p>
)
)
)
Hi Fastrun,
JPATH_SITE is a Joomla! constant - I think that the equivalent in WordPress is ABSPATH - if that doesn't work you'll need to find the bit that goes before the /wp-content/ on your site and add that manually.
Bob
JPATH_SITE is a Joomla! constant - I think that the equivalent in WordPress is ABSPATH - if that doesn't work you'll need to find the bit that goes before the /wp-content/ on your site and add that manually.
Bob
Hello Bob,
Thanks for your answer. ABSPATH points to a local directory on a hard drive.
The bit that goes before is /wwwroot
But unfortunately that doesn't help.
Fastrun
Thanks for your answer. ABSPATH points to a local directory on a hard drive.
The bit that goes before is /wwwroot
But unfortunately that doesn't help.
Fastrun
This topic is locked and no more replies can be posted.