Form Attachment More Secure?

brandon 17 Aug, 2008
I had spoken to my server admin and thought if you don't want to have to change permissions on the directories to allow attachments you could change the chronocontact.php to do the following.

//Comment current code line and add following
//move_uploaded_file($uploadedfile, $targetfile);
if(!copy($uploadedfile, $targetfile))
echo "File Copy Complications";

Also if you don't wish to have the documents left on the server you could setup an option to do the following after sending the email.
/**
* Send the email(s)
*/
$email_sent = JUtility::sendMail($from, $fromname, $recipient, $subject, $html_message, true,
$ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
//For Each Attachment remove it off the server
foreach($attachments as $value)
unlink($value);
Max_admin 18 Aug, 2008
Hi Brandon,

Thanks for the suggestions!

Best,

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.