General description of how it would work,
[php]
<?php
$recipients = array(
1 => "
[email protected]",
2 => "
[email protected]",
3 => "
[email protected]",
);
/*
* checks if POST is defined. Also checks to see if the value sent is in the predefined array.
* If the value exists, it has an email to send to, if not it does not send the email.
*/
if ( isset( $_POST['to']) )
{
echo "
Are you sure you want to send an email to " . $recipients[ $_POST['to']] . "?
";
// your mail() function would go here. For your benefit, escape everything that you personally did
// not create. As in the message, subject, the senders email, everything.
}
?>
Select who you want to send the email to:
Sales
Support
Marketing
<input type="submit" name="submit" value="SEND">
[/php]