Forums

Few recipients on each item from dropdown list dynamically?

Natiolife 27 Feb, 2012
Hi there! My dear, sorry, please help, how can I realize functional part of ChronoForms 4.0 RC1.7 component to set few different recipients on each item from dropdown list dynamically?

For example:

There is dropdownlist:
<select name="recipients">
 <option value="em1">Name 1</option>
 <option value="em2">Name 2</option>
 <option value="em3">Name 3</option>
</select>

Variable get the next:
$emails = array('em1'=>'name_1@example.com', 'em2'=>'name_2@example.com', .
. .);

(this way works!)

but this way - doesn't:
$emails = array('em1'=>'name_1@example.com, name_11@example.com,...', 'em2'=>'name_2@example.com', . . .);


As you see, here I try to send two emails on item em1: 'em1'=>'name_1@example.com, [email]name_11@example.com[/email],...' but after clicking button SUBMIT, there appears message like:

You must provide at least one recipient email address.

Language string failed to load: invalid_address: [email]'name_1@example.com[/email]', [email]'name_11@example.com[/email]'You must provide at least one recipient email address.

Thank you! Mail has been sent.



How can I send mail to few recipients dependently on selected option from the list? Is there ability at all?
Max_admin 11 Mar, 2012
Hi,

A bit late, but try this:
$emails = array('em1'=>'name_1@example.com,name_11@example.com,...', 'em2'=>'name_2@example.com', . . .);


No spaces between addresses ^^

or even this:

$emails = array('em1'=> array('name_1@example.com', 'name_11@example.com'), 'em2'=>'name_2@example.com', . . .);


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.