Welcome to WebmasterWorld Guest from 54.145.144.101

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

formmail cgi Select from multiple recipients

Use select input and %recipient_alias to choose message recipient

   
5:19 pm on Feb 1, 2006 (gmt 0)

5+ Year Member



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>

(in formmail.pl)
%recipient_alias = (
'Feedback' => 'address1@agency1.mil',
'Initiative' => 'address1@agency1.mil',
'Training' => 'address1@agency1.mil',
'Other' => 'address1@agency1.mil',
'Accountability' => 'address2@agency2.mil',
'Support' => 'address3@private.com',
);

8:21 pm on Feb 3, 2006 (gmt 0)

5+ Year Member



This is working now. No need to reply.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month