email from facile forms Have tried on facile forms forum without success. Can anyone help here? i suspect my problem may be a more related to way I've put info into Mambo rather than specific to Facile Forms.
I have created a simple volunteer registration form and want to send a "thankyou" email to the registrant.
I know no php at all so its v. confusing but have put what I think are correct variables but no confirmation email is sent to the form filler I have copied a php file and changed the variables to what I thought was correct and I have put following into pieces Begin submit.custom That should send the email when they submit the form
My form is named Volunteer Registration/volunteer and the volunteers email field is email Address/email.
I would like the the email subject to be the same as the form title field Form Title/form_title_txt
// This php piece sends an email
global $mosConfig_mailfrom, $mosConfig_fromname;
// init vars
$from = $mosConfig_mailfrom;
$fromname = $mosConfig_fromname.' - volunteer';
$recipient = '';
$subject = '';
$body = '';
// extract form data
foreach ($this->submitdata as $data)
switch ($data[1]) {
case 'email':
$emailt = $data[4];
break;
case 'subject':
$form_title_txt = $data[4];
break;
case 'message':
$body = "Greetings! Thank you for your inquiry! Due to the large number of inquiries we receive, it may
take more than 24 hours for a response. Please call one of the following clubs in your local area to
address your questions immmediately. Look forward to hearing from you!
Best regards,
etc...";
break;
default:
break;
} // switch
// uncomment this to debug the piece
// echo "$from $fromname $recipient $subject $body";
// exit;
// send the mail
mosMail($from, $fromname, $recipient, $subject, $body);
This must be wrong as it doesn't work - could one of you helpful people tell me why and what to do |