Issue when I combine multiple dynamic send to addresses

yaksushi 11 May, 2012
I've seen several forum posts talking about dynamic emails but I couldn't figure out my issue by reading the posts.

I have a form that a user can add up to 3 email addresses and the forum will send an email to those 3 addresses.

My form has 3 text boxes email_1 email_2 and email_3

In a custom code box before sending the email I have the following code

<?php
$form->data['emails'] = "{$form->data['email_1']}, {$form->data['email_2']}, {$form->data['email_3']}";
?>


In my emails Dynamic To block I have the word emails in there

The debugger is saying the following:
Invalid address: anemail@gmail.com, anemail@hotmail.com, anemail@yahoo.com Data Array: 


What am I missing? Also how can I get this to work if the user only inputs 1 or 2 email addresses? Thanks in advance for any help you can offer!
This topic is locked and no more replies can be posted.