Dear Perl Monks,
I have a problem that needs your wisdom and urgent help...
I've tried to create a web based CGI form that should sends out
emails to multiple email addresses when one, or multiple checkbox(s) is
selected. It works fine when one checkbox is selected, but when
more than one is selected it does not work.
If you check more than one box, it won't send to anyone because it wouldn't be equal to 'Email_Group1' for example.. it would be equal to something like 'group1@domain.com - group2@domain.com' if both of those checkboxes where checked.
Please let me know how to make the script be able to send out to one, or multiple email address if
one or more checkboxes are selected. I have not been able to resolved this for a couple of days now
and have come to a dead end.
Thanks so much!
Below is an example of the cgi code...
if($in{'chkboxname1'} eq 'Email_Group1'){
$in{'form-to'} = 'group1@domain.com';
}
if($in{'chkboxname2'} eq 'Email_Group2'){
$in{'form-to'} = 'group2@domain.com';
}
if($in{'chkboxname3'} eq 'Email_Group3'){
$in{'form-to'} = 'group3@domain.com';