Using Joomla 1.5.1 and ChronoForms V2.5 J1.5 RC2.1
Problem: File upload works but no email alert with file attachment is sent. If I submit the form WITHOUT a a file upload then an email alert IS sent.
I've been beating around for an answer on this for several days now. Client is getting a bit testy.
Any hints on where to start looking would be greatly appreciated.
I'll be glad to supply any supporting information but at this time I don't know what to send.
I have read in some of the threads that a file upload that is working properly will include the uploaded file as an attachment to the email alert. This is what I would really like.
One hint that may be the culprit: in my configuration.php file there is no $mosConfig_fileperms = ''; tag. Manually adding $mosConfig_fileperms = '0644'; does no good.
Hi gChambers,
This seems to be related to the Chmod problem in Joomla 1.0.x.
If you turn debug one what do you see? My guess is that you get 'Form not sent'. If so, please set your error reporting to the highest level and see if you can get any error message.
Bob
With Debug turned on... this is the notice that is dispalyed:
PHPMAILER_FILE_OPEN/home/laborpow/public_html/components/com_chronocontact/upload/20080314091753_test02_Resume.pdf
Looks to be a statement that the file had been uploaded to the site. This is fine and expected.
The problem is that there is no email alert that a file has been uploaded.
When I fill out the form but DO NOT include a file for upload then an alert email IS sent.
Something, somewhere is obviously causing a conflict. This is where I need help.
What I need to happen before I can release this to the client is enable site visitors to upload a file, then have an email alert sent to the client informing them that a file has been uploaded. Hopefully the uploaded file would be included as an attachement to the email alert.
Hi Greg,
Have you fixed this ? if not then at your chronocontact.php, make the handle_uploaded_files function as this :
function handle_uploaded_files($uploadedfile, $filename, $limits = TRUE, $directory = FALSE)
{
$fileperms = "0644";
$uploaded_files = "";
$upload_path = JPATH_SITE.'/components/com_chronocontact/upload/';
if ( is_file($uploadedfile) ) {
$targetfile = $upload_path.$filename;
while ( file_exists($targetfile) ) {
$targetfile = $upload_path.rand(1,1000).'_'.$filename;
}
move_uploaded_file($uploadedfile, $targetfile);
$uploaded_files = $targetfile;
}
return $uploaded_files;
}
let us know!
Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
SOLVED. PERFECTO.
One minor programming note...
Was returned a syntax error upon first try that pointed to line 550.
Checked your suggested code against what you had written earlier and saw this discrepancy:
Your new code suggestion: $uploaded_files = ;
Previous code: $uploaded_files = "";
Swapped out the the previous line for new and all is well.
NOTE TO OTHERS IN THIS FORUM: I have purchased two licenses of ChronoForms in an effort to support this fine component. Would encourage others to forget the testing phase and just go for the real deal. This is one very powerful component and I have no doubt that it will only get better with age.
Hi Maizz,
Please check the file permissions at your global config of the site, what is it ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi,
I am also with the same problem
I am only using with 0777
Any hint to improve it?
It is very difficult to write in English
Excuse the grammatical error
thanks
Hi all,
Please replace the line above :
$fileperms = "0644";
with :
$fileperms = 0644;
at chronocontact.php
this will fix it!
Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This has solved my problem (atatch the uploaded file to the email).
Remember:
$fileperms = "0644";
with :
$fileperms = 0644;
Thanks!!😉
Had the same problem with No Email Alert, but I copied the handle_uploaded_files code above - perfect!!! email alert w/ upload attachment - this is an A-1, kick a** extension.