Hello,
I tried to use the point 31 in the faqs : How can I safely show a list of e-mail addresses?
I created a select element :
And in the On Submit code - before sending email I put :
When submitted I get : Could not instantiate mail function
Any help please?
Best regards
Amorino
I tried to use the point 31 in the faqs : How can I safely show a list of e-mail addresses?
I created a select element :
<select class="cf_inputbox validate-selection" id="select_13" size="1" title="Vous n'avez pas choisis le pays de destination" name="select_13" onChange="affiche(this.value)">
<option value="" selected>Pays</option>
<option value="france">France</option>
<option value="maroc">Maroc</option>
<option value="tunisie">Tunisie</option>
</select>
And in the On Submit code - before sending email I put :
<?php
$emails_2 = array('france'=>'aaa@aaa.fr;bbb@bbb.fr;ccc@ccc.fr', 'maroc'=>'ddd@ddd.fr;eee@eee.fr;fff@fff.com', 'tunisie'=>'ggg@ggg.fr; hhh@hhh.fr');
$MyForm =& CFChronoForm::getInstance('PlanifierRDV2');
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$MyFormEmails->setEmailData(1, 'to', $emails_2[$_POST['select_13']]);
?>
When submitted I get : Could not instantiate mail function
Any help please?
Best regards
Amorino
Sometimes I get strangely after submit a message like:
You are not allowed too access this URL
Best regards
Amorino
You are not allowed too access this URL
Best regards
Amorino
Hi amorino,
Please try turning the Check Token to OFF in the form General tab.
Bob
Please try turning the Check Token to OFF in the form General tab.
Bob
Hello,
a very very strange thing is happening whith this code!
The one in the center (maroc) is working but not the other two !
Is this meaning something for you?
Any help please?
Best regards
Amorino
a very very strange thing is happening whith this code!
The one in the center (maroc) is working but not the other two !
Is this meaning something for you?
Any help please?
Best regards
Amorino
Hello BOB
I'm really sorry I created this thread by mistake
Could you please merge it with this one : http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=20417
Thank you a lot
Best regards
Amorino
I'm really sorry I created this thread by mistake
Could you please merge it with this one : http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=20417
Thank you a lot
Best regards
Amorino
Hi amorino,
The code looks OK to me. You have semi-colon (;) separated lists where I think I'd have used commas (,) and there is a tiny difference in spacing. I don't see any good reason when 'maroc. would woroka and the other two not work.
The "Could not instantiate mail function" is usually a sign that there is no mailer set up on your site - but the Joomla! mailer errors are not always very accurate.
Please turn debug on in the form General Tab, then submit the form and post the debug - including the 'dummy emails' results here.
Bob
The code looks OK to me. You have semi-colon (;) separated lists where I think I'd have used commas (,) and there is a tiny difference in spacing. I don't see any good reason when 'maroc. would woroka and the other two not work.
The "Could not instantiate mail function" is usually a sign that there is no mailer set up on your site - but the Joomla! mailer errors are not always very accurate.
Please turn debug on in the form General Tab, then submit the form and post the debug - including the 'dummy emails' results here.
Bob
This topic is locked and no more replies can be posted.