Cfv6 Mail attachment

aekinci 27 Oct, 2017
I want to attach a file to mail the way that i use in cfv5 but it's not working. This is the custom code before the email:

<? php
$path =JPATH_SITE. '/components/com_chronoforms6/uploads/';
$form->files['my_file']['path'] = $path.'template.docx';
? >

I've added my_file to the attachment list in email and this is debugger output:

[files] => Array
(
[0] => my_file
)

[result] => the Mail could not be sent.
[var] =>
)

)
Max_admin 28 Oct, 2017
Answer
Please try the following in the attachments box in the email settings:
{path:root}/components/com_chronoforms6/uploads/template.docx


Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This worked for me but please could the documentation be updated to reflect this way of setting the attachment for the email?

Thanks, Dave Martin
This topic is locked and no more replies can be posted.