Please, I need to know how to send file by e-mail, but without upload the file to server. Is it possible to attach file only to email? Thank you.
Forums
Send file by mail without upload to server
Hi D_M,
Please say more abotu what you need. Is this a user file? Or a file already on a server?
Bob
Please say more abotu what you need. Is this a user file? Or a file already on a server?
Bob
I have form with item for attachment of file. After submit I want to send the file only by email. This is functional only with setting of upload the same file on server - File uploads -> enable uploads: yes - and here is also Full upload path:C:/CMS/components.... I need dont upload to this directory at all but only to send by e-mail.
Hi D_M,
this is not possible, the file should be on the server and accessible to be able to get attached to emails, you may delete it after that though!
Cheers,
Max
this is not possible, the file should be on the server and accessible to be able to get attached to emails, you may delete it after that though!
Cheers,
Max
Thank you. I thought this same. Can you advise how to delete the file from directory after sending, automaticaly without my everyday control. I am only user of joomla, I am not programmer in php or javascript but I understand I can add some script to process.
Ok, try this code in the onSubmit after email box:
this should delete the files uploaded by the current form after they are attached and sent!
Regards,
Max
<?php
$MyUploads =& CFUploads::getInstance($MyForm->formrow->id);
JFile::delete($MyUploads->attachments);
?>
this should delete the files uploaded by the current form after they are attached and sent!
Regards,
Max
Thanks for confirming this! 🙂
Max
Max
This topic is locked and no more replies can be posted.