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? 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]'; } 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
Archived
This topic is now archived and is closed to further replies.