V6 e-mail attachment

Attach a PDF file to a ChronoForms email response.

Overview

The issue occurs when using an incorrect file path format in the CF email action's attachment field.
Ensure you use the full server path, not a web URL, in the Attachments list. Enable the debugger to verify the path and troubleshoot if emails fail to send.

Answered
ChronoForms v6
Pi Pietervoo 08 May, 2020
Hello,

I'm trying to attach a standard pdf file to the e-mail response users receive when submitting a form.

I've entered 'file1' in the list attachement.

I'm using this custom code before the e-mail options: [pre]<?php
$form->files["file1"]["path"] = "images/documents/file1";>[/pre]
Is there anything I'm missing?

Cheers, [br]Pieter
Gr GreyHead 08 May, 2020
Hi Pieter,

You can add it directly in the Attachments list box of the email action - but it needs to be a *full* path - yours does not include the first part before images/

Bob
Pi Pietervoo 08 May, 2020
Hi Bob,

Thanks for your reply. I've tried to add the full path to the attachment list. But when I submit the form the e-mail somehow doesn't come through anymore.

Pieter
Gr GreyHead 08 May, 2020
Hi Pieter,

Please enable the Debugger and copy and paste the Debugger output here.

Bob
Max_admin Max_admin 08 May, 2020
Answer
The path to file in the attachments should be a server path, you are using a web path here and that will not work!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Pi Pietervoo 13 May, 2020
Hi Max,

What exactly is the difference between a server path and a web path?

Pieter
Max_admin Max_admin 14 May, 2020
web path is like http://www.whatever.com/file.pdf

But a server path will usually be like C:/file.pdf or /public_html/files/file.pdf
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.