[thelist] PHP - Email comes to a central server, then is re-routed by zip c ode or city. How do I do this?

Magnus Østergaard thelist at lists.evolt.org
Mon Oct 21 18:26:01 2002


Valerie Worrell wrote:

>How do I re-route emails that are received at a central server, by a zip
>code or city that is included in the form questionnaire, to another
>recipient?
>
>

>Often, the sender has questions that need to be
>answered by their local store.
>
>The form is a php form.
>
Why not make the forms e-mail adress be the same as the zip code?

Like: zipkode@example.com

Your To header could be something like:

<?
 $mail_to  = "$zipcode@example.com";
?>

This would also be easy to filter on the server side with procmail or a
.qmail file.

// Magnus