Hi, I'm trying to use this Custom Code
<?php
$path = JPATH_SITE.'/components/com_chronoforms5/uploads/folder_name/';
$form->files['field_name']['path'] = $path.'file_name.jpg';
?>
but it does not seem to work with Chronoforms v6.
The problem is that the email does not start,
in fact the debugger gives me this view: files] => Array
(
[0] => guide
)
[result] => the Mail could not be sent.
Thanks to everyone who wants to help me
Hi gmarra,
If this is the same file each time you can add the full file path to the Attachments list box in the Email action.
Bob
This thread seems to be marked as answered. Hope this post is noticed ??
No, where it says"value" you should put the value. And you should use the dropdown value not label in the switch cases
But really just use a switch action (not event switcher). What you're doing doesn't need to be done in PHP.
WOW.. Thanks.
This is what was confusing me. I am going to try now.
Thanks again..
Ron
And what have you put in the attach files box in the email action
I have a custom code for my email body. named "for_email" and in email body I call it by {var:for_email} The switch is named "attach_file" and in Attachments list I added {var:attach_file}
And you have the switch set to return var only?
Does the file actually exist at the location specified
What error does the debug show
Yes the file exists. CFV5 works at this moment. The debugger shows no error.. I sent a screen shot in earlier post,
Thanks
The debugger you sent shows nothing, send the whole thing. Copy paste.
Hello healyhatman
I sent you a pm.. Please see it.
Thanks
Hello,
The switch block may not work as it takes the path as an email. So the email sending fails and no attachment is establishes. I tried with custom code and also with php block. Nothing seems to work.
Any help I would greatly appreciate.
Thanks
Ron
I replied to your PM. Check your file location. What do you mean it "takes the path as an email"?
Try just putting the path to one file directly in the file attach list and see if it sends
Hello,
Could not succeed in attaching any file. If I add anything in the attach Attachments settings it stops sending email.
I don't know what more to do.
Send me login details and I'll have a look
I have sent you a PM.. Please see