nlaugh Posted November 7, 2011 Share Posted November 7, 2011 I have an array for recipients 'recipients' => array( '[email protected]', ), and I need to mail different recipients by form option, something like this switch($_POST['color']){ case 'red': $recipient = '[email protected]'; break; case 'green': $recipient = '[email protected]'; break; case 'blue': $recipient = '[email protected]'; break; default: $recipient = '[email protected]'; } I don't know how to combine the two? Quote Link to comment https://forums.phpfreaks.com/topic/250639-mail-recipent-by-form-option/ Share on other sites More sharing options...
nlaugh Posted November 7, 2011 Author Share Posted November 7, 2011 'recipients' => array( '[email protected]', ), switch($_POST['color']){ case 'red': $recipient = '[email protected]'; break; case 'green': $recipient = '[email protected]'; break; case 'blue': $recipient = '[email protected]'; break; default: $recipient = '[email protected]'; } Quote Link to comment https://forums.phpfreaks.com/topic/250639-mail-recipent-by-form-option/#findComment-1285947 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.