Hi!
I am George!
I have a radio site, and I want my visitors to send me their dedication. I want to have a form, where the visitors can choose the producer, and I want the e-Mail to be send at the producers e-mail.
I've searched the FAQs, and I've used the FAQ #31. Also, I've searched the forum, but I couldn't find any answer for me.
The code I've used is:
To my HTML Form:
and the On Submit code - before sending email is:
What I am doing wrong?
I can't send any e-mail from the form.
Thanks in advance!
George,
Greece
Sorry for my English.
I am George!
I have a radio site, and I want my visitors to send me their dedication. I want to have a form, where the visitors can choose the producer, and I want the e-Mail to be send at the producers e-mail.
I've searched the FAQs, and I've used the FAQ #31. Also, I've searched the forum, but I couldn't find any answer for me.
The code I've used is:
To my HTML Form:
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Παραγωγός(Producer)</label>
<select class="cf_inputbox validate-selection" id="recipients" size="1" title="Αυτό το πεδίο είναι υποχρεωτικό." name="recipients">
<option value="em1">Name 1</option>
<option value="em2">Name 2</option>
<option value="em3">Name 3</option>
</select>
and the On Submit code - before sending email is:
<?php
$emails_2 = array('em1'=>'sample1@email.com', 'em2'=>'sample2@email.com', 'em3'=>'name_3@example.com', . . .);
$MyForm =& CFChronoForm::getInstance('form_name_here');
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$MyFormEmails->setEmailData(1, 'to', $emails_2[$_POST['recipients']]);
?>
What I am doing wrong?
I can't send any e-mail from the form.
Thanks in advance!
George,
Greece
Sorry for my English.