Forums

Send file by mail without upload to server

D_M 26 May, 2009
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.
GreyHead 26 May, 2009
Hi D_M,

Please say more abotu what you need. Is this a user file? Or a file already on a server?

Bob
D_M 26 May, 2009
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.
Max_admin 26 May, 2009
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
D_M 26 May, 2009
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.
Max_admin 27 May, 2009
Ok, try this code in the onSubmit after email box:


<?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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
D_M 28 May, 2009
Dear Max,
it is functional very well, thank you very much, I am ecstatic! Dita
Max_admin 01 Jun, 2009
Thanks for confirming this! 🙂

Max
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.