Hey,
I have tried, using FAQ 31, to send an inquiry to multiple hidden emails.
Store 1 Inquiry goes to [email]email1@domain.com[/email], [email]email2@domain.com[/email], [email]email3@domain.com[/email], etc
Store 2 Inquiry goes to [email]email1@domain.com[/email], email4@domain.com, email5@domain.com, etc
The actual emails have been changes for the sake of this post.
My OnSubmit code looks like this:
The associated HTML code looks like this:
Is this the proper way to execute this? It doesn't seem to be working. So I guess it isn't.
Any help is appreciated.
I have tried, using FAQ 31, to send an inquiry to multiple hidden emails.
Store 1 Inquiry goes to [email]email1@domain.com[/email], [email]email2@domain.com[/email], [email]email3@domain.com[/email], etc
Store 2 Inquiry goes to [email]email1@domain.com[/email], email4@domain.com, email5@domain.com, etc
The actual emails have been changes for the sake of this post.
My OnSubmit code looks like this:
<?php
$recipient = JRequest::getString('recipients', '', 'post');
$emails = array (
'em1' => 'email1@domain.com','email2@domain.com','email3@domain.com','email4@domain.com',
'em2' => 'email1@domain.com','email5@domain.com','email6@domain.com','email4@domain.com',
'em3' => 'email1@domain.com','email7@domain.com','email8@domain.com','email4@domain.com',
);
$email_to_use = $emails[$recipient];
JRequest::setVar('email_to_use', $email_to_use);
?>
The associated HTML code looks like this:
<select name="recipients">
<option value="em1">Store 1</option>
<option value="em2">Store 2</option>
<option value="em3">Store 3</option>
</select>
Is this the proper way to execute this? It doesn't seem to be working. So I guess it isn't.
Any help is appreciated.
I have revised my onSubmit code to this:
But it is still not working. Thoughts?
<?php
$recipient = JRequest::getString('recipients', '', 'post');
$emails = array (
'em1' => array('email1@domain.com','email2@domain.com','email3@domain.com','email4@domain.com'),
'em2' => array('email1@domain.com','email5@domain.com',email6@domain.com','email4@domain.com'),
'em3' => array('email1@domain.com','email7@domain.com','email8@domain.com','email4@domain.com'),
);
$email_to_use = $emails[$recipient];
JRequest::setVar('email_to_use', $email_to_use);
?>
But it is still not working. Thoughts?
Hi,
You have a missing single quote in the em2 array.
Regards,
Max
You have a missing single quote in the em2 array.
Regards,
Max
This topic is locked and no more replies can be posted.