Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
formmail cgi Select from multiple recipients Use select input and %recipient_alias to choose message recipient MMEric
I need help getting my formmail cgi script to send to the right recipient based on a user selection from a list. Does anyone have experience with this. I have tried it in the fashion below, but it is only sending to the first email address in my %recipient_alias hash list. @allow_mail_to and @recipients where both left empty.
(in web form)
<select id="recipient" name="recipient" tabindex="1"> <option>Select recipient</option> <option value="Feedback">Website Feedback</option> <option value="Initiative">QEI Questions</option> <option value="Training">QEI Training</option> <option value="Other">Other</option> <option value="Accountability">QEA Questions</option> <option value="Support">Website Support</option> </select>
%recipient_alias = ( 'Feedback' => 'email@example.com', 'Initiative' => 'firstname.lastname@example.org', 'Training' => 'email@example.com', 'Other' => 'firstname.lastname@example.org', 'Accountability' => 'email@example.com', 'Support' => 'firstname.lastname@example.org', );
This is working now. No need to reply.