[thelist] formmail sending to different recipients

Feingold Josh S Josh.S.Feingold at irs.gov
Thu May 9 14:46:01 CDT 2002

[ Picked text/plain from multipart/alternative ]
> Anyone know of a way, or mailform that will allow you > to have the user
> select the department the email should go to and have > to form deliver to
> that selected recipient? i have a list of 6 different > recipients that i
> would need the form to be mailed to.

Use server side scripting to allow for conditional processing based on the
department value returned from (the select box of) the form.

Something like:

if ($department == "Tech") {
	$email = marge at domain.com
} elseif ($department == "Finance") {
	$email = harry at domain.com
} else {
	$email = john at domain.com

Then use $email as a variable in your sendmail script.


More information about the thelist mailing list