Hi,
I'm trying to dynamically change the email recipient using the drop-down menus, and I'm following this post for direction on how to accomplish that. However, I'm not receiving any emails to my test email addresses.
Here's the HTML that I'm using in my form:
and here's the PHP code that I'm using in the "On Submit code - before sending email" field:
I'm also attaching a screen shot of how I setup the email. When I used just the plain "TO" field, I received emails at my test email address, but ONLY at the one that was added in the email setup screen. The ones in the above PHP code were ignored. When I use the "Dynamic TO" field, I don't receive any emails at all.
What am I missing?
Thanks
I'm trying to dynamically change the email recipient using the drop-down menus, and I'm following this post for direction on how to accomplish that. However, I'm not receiving any emails to my test email addresses.
Here's the HTML that I'm using in my form:
<div class="form_item">
<div class="form_element cf_dropdown" id="divsubject">
<label class="cf_label">Subject</label><br />
<select class="cf_inputbox" id="select_5" size="1" name="subject">
<option value="general">General Questions</option>
<option value="booking">Booking</option>
<option value="marketing">Marketing</option>
<option value="ticketing">Ticketing</option>
</select>
</div>
</div>
and here's the PHP code that I'm using in the "On Submit code - before sending email" field:
<?php
$emails_2 = array('general'=>'testemail1@gmail.com', 'booking'=>'testemail2@gmail.com', 'marketing'=>'testemail3@yahoo.com', 'ticketing'=>'testemail4@hotmail.com');
$emails[0]->to = $emails_2[$_POST['subject']];
?>
I'm also attaching a screen shot of how I setup the email. When I used just the plain "TO" field, I received emails at my test email address, but ONLY at the one that was added in the email setup screen. The ones in the above PHP code were ignored. When I use the "Dynamic TO" field, I don't receive any emails at all.
What am I missing?
Thanks
Hi Insomn3ak,
due to some changes in the RC3 core, your code above will not work, I'm working on a new version to be out today or tomorrow which will fix this problem!
Regards
Max
due to some changes in the RC3 core, your code above will not work, I'm working on a new version to be out today or tomorrow which will fix this problem!
Regards
Max
Great, check soon, it will be much better, readable and logical!😉
Max
Max
This topic is locked and no more replies can be posted.