homepage Welcome to WebmasterWorld Guest from 54.226.43.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
formmail cgi Select from multiple recipients
Use select input and %recipient_alias to choose message recipient
MMEric




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

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',
);

 

MMEric




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

This is working now. No need to reply.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved