• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Attaching uploaded file to directory email

Attaching uploaded file to directory email 8 years 5 months ago #36060

  • jinoue
  • jinoue's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Is there a way to attach the uploaded file in a submission to the directory email?

I am trying to get the uploaded file associated to the submission attached to the email generated when the submission is edited.
The administrator has disabled public write access.

Attaching uploaded file to directory email 8 years 5 months ago #36062

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

You can include a File Upload attachment to the directory email through similar steps:

- navigate to backend > Components > RSForm!Pro > Manage Directories > your form directory > PHP Scripts > Script called before the Directory Emails are sent.

- add the following script:
$fileUploadElement = 'myFileUploadNamehere';
list($replace, $with) = RSFormProHelper::getReplacements($SubmissionId);
$filePath = str_replace($replace, $with, '{'.$fileUploadElement.':localpath}');
$directoryEmail['files'][] = $filePath;

- replace myFileUploadNamehere with the exact name of your File Upload element (case sensitive).
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

Attaching uploaded file to directory email 3 years 4 months ago #41697

  • info8008
  • info8008's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello,

The code above work for me on User Email but I would like this attachment in th Admin Email. This is possible?

Thank you for your help
L.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!