Attach file to email (full absolute path)

bcraigie 15 Sep, 2024

Hi Max,

Using the demo contact form as a basis.

Is there a way to get the document root as a variable so that it doesn't have to be hardcoded in the filename when trying to attach a file to an email?

In PHP this would be $_SERVER['DOCUMENT_ROOT']

So it is possible to access this in Chronoforms?

The attachment filename could then be written something like:

{$_SERVER['DOCUMENT_ROOT']}/some_file_name_here

Thanks!

Max_admin 27 Sep, 2024
Answer

you can use {path:front} to the get the path to the Chronoforms folder: joomla/components/com_chronoforms8/

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger