Hello all,
i have problems with attaching a file from my server to the email in chronoforms.
The images show what i did. The email is send to my address but there is no attachment.
What am i doing wrong?
Any answer is welcome.
Greetings Potter
i have problems with attaching a file from my server to the email in chronoforms.
The images show what i did. The email is send to my address but there is no attachment.
What am i doing wrong?
Any answer is welcome.
Greetings Potter
Hello potter68,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Problems with 'Reply To' Email addresses
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Problems with 'Reply To' Email addresses
P.S: I'm just an automated service😉
Domo origato Mr. Roboto!
But the hack is not working - still the same problem.
But the hack is not working - still the same problem.
Thank you, but it does not help. Btw. i did all threads with attachments.
In the picture you can see the Custom Code field. It goes like this:
<?php
$form->data['attached'] = 'http://ABSOLUTE_PATH/test.pdf';
?>
So, i will have a field called 'attached'. And this field is added to the 'Attachments field' of the Email event like that: {attached}
So what did i miss?
Greetings Potter
In the picture you can see the Custom Code field. It goes like this:
<?php
$form->data['attached'] = 'http://ABSOLUTE_PATH/test.pdf';
?>
So, i will have a field called 'attached'. And this field is added to the 'Attachments field' of the Email event like that: {attached}
So what did i miss?
Greetings Potter
Hi Potter,
Your code will not work because the email action needs an absolute path to the file.
Please try this code:
You should also use "myfile" in the attachments fields names box, not {myfile}
Regards,
Max
Your code will not work because the email action needs an absolute path to the file.
Please try this code:
$form->files["myfile"]["path"] = "absolute path to file here";
$form->files["myfile"]["name"] = "file name here";
You should also use "myfile" in the attachments fields names box, not {myfile}
Regards,
Max
Hello,
thanks for that fast reply! But unfortunately, it is still not working.
The pictures show what i did:
1. I changed my PHP snippet the way you told me (compare to img3)
2. I wrote myfile into the attachment field of the email action.
The debug result is shown in img4.
It is much better (at least the path is visible now), but i am still something missing.
Greetings Potter
thanks for that fast reply! But unfortunately, it is still not working.
The pictures show what i did:
1. I changed my PHP snippet the way you told me (compare to img3)
2. I wrote myfile into the attachment field of the email action.
The debug result is shown in img4.
It is much better (at least the path is visible now), but i am still something missing.
Greetings Potter
Hello,
i got it finally made! You guys put me on the right way!
The PHP code did change to:
<?php
$form->files["myfile"]["path"] = JPATH_SITE.'/images/downloads/test.pdf';
$form->files["myfile"]["name"] = 'test.pdf';
?>
I did not use the 'http://www.MY_WEBSITE.com' as my PATH variable. Instead, i used the build in 'JPATH_SITE' value (as seen in your FAQ).
Another thing is that you also have to add the document's name to the path.
It's always the detail.
Thanks a lot again for your fast help and that great plugin, Potter
i got it finally made! You guys put me on the right way!
The PHP code did change to:
<?php
$form->files["myfile"]["path"] = JPATH_SITE.'/images/downloads/test.pdf';
$form->files["myfile"]["name"] = 'test.pdf';
?>
I did not use the 'http://www.MY_WEBSITE.com' as my PATH variable. Instead, i used the build in 'JPATH_SITE' value (as seen in your FAQ).
Another thing is that you also have to add the document's name to the path.
It's always the detail.
Thanks a lot again for your fast help and that great plugin, Potter
Hi potter68,
JPATH_SITE is usually the correct prefix to use if you are attaching a file to an email as it gives the server folder path.
JURI::root() is usually the correct prefix to use if you want to add a link in the body of an email.
Note: JURI::root() includes the final / JPATH_SITE doesn't
Bob
JPATH_SITE is usually the correct prefix to use if you are attaching a file to an email as it gives the server folder path.
JURI::root() is usually the correct prefix to use if you want to add a link in the body of an email.
Note: JURI::root() includes the final / JPATH_SITE doesn't
Bob
This topic is locked and no more replies can be posted.