Jump to content

mail recipent by form option


nlaugh

Recommended Posts

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

'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]';
         }

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.