Hi all.
I need to send an email (trough chronoforms) with a file attachment trough upload form, but I don't need to storage this file in my hosting server.
I can send attachments without any problems. But my storage of my hosting server is growing to much.
I searched in forums with no lucky.
Any ideas?
Thanks a lot.
I need to send an email (trough chronoforms) with a file attachment trough upload form, but I don't need to storage this file in my hosting server.
I can send attachments without any problems. But my storage of my hosting server is growing to much.
I searched in forums with no lucky.
Any ideas?
Thanks a lot.
Hi SHaDoW,
You can delete the file after the email is sent using PHP in the OnSubmit After Email box
Or you could set up a Cron job to remove all the saved files every week or so.
Bob
You can delete the file after the email is sent using PHP in the OnSubmit After Email box
Or you could set up a Cron job to remove all the saved files every week or so.
Bob
Hi all.
I follow the tip of GreyHead and really works.
I post the code for future references.
Paste this code on:
Form Management -> Enter in your form -> Form Code -> On submit code - after sending email
Obviously this code isn't perfect, but works.
This code remove all content of the folder after sending an email with attachment.
Thats all.
Thanks a lot. See you.
I follow the tip of GreyHead and really works.
I post the code for future references.
Paste this code on:
Form Management -> Enter in your form -> Form Code -> On submit code - after sending email
<?php
$ruta = '/path/to/the/folder/*';
$arxiu = glob($ruta);
array_map('unlink', $arxiu);
?>
Obviously this code isn't perfect, but works.
This code remove all content of the folder after sending an email with attachment.
Thats all.
Thanks a lot. See you.
This topic is locked and no more replies can be posted.