CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Multiple email recips from drop down?

 



xyzbytes
Deleted

Jul 21, 2000, 11:06 AM

Post #1 of 2 (412 views)
Multiple email recips from drop down? Can't Post

Hello all,
I would like to mail the form results to an email recipient selected from a drop down menu.
Any comments, links,code,examples would be great!

Thanks in advance!


moon_rabbit
Deleted

Jul 21, 2000, 2:01 PM

Post #2 of 2 (412 views)
Re: Multiple email recips from drop down? [In reply to] Can't Post

This is really just an HTML question:

The drop-down box:

<SELECT NAME="email" MULTIPLE>
<OPTION VALUE="person1@somewhere.com">Person 1
<OPTION VALUE="person2@somewhere.com">Person 2
<OPTION VALUE="person3@somewhere.com">Person 3
</SELECT>


Then do the following in the cgi script after you have parsed the data and opened MAIL and printed the Content-type line (an example, you might have different variable names):

print "To: $formdata{'email'}\n";

If you use the MULTIPLE attribute in the SELECT tag, the $formdata{'email'} will consist of one or more addresses separated by commas, which works for sending multiple messages.

I suspect that there are some serious security issues with this type of setup, since it requires that the user must be able to enter more than one @ in the email field. Probably not a good idea.


[This message has been edited by moon_rabbit (edited 07-21-2000).]

[This message has been edited by moon_rabbit (edited 07-21-2000).]

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives