How To Control Email Recipient With Form Dropdown? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceHow do you disable browser Autocomplete on web form field / input tag?How can I prevent SQL injection in PHP?How to horizontally center a <div>?How to change an element's class with JavaScript?How to check whether a checkbox is checked in jQuery?How to prevent buttons from submitting formsHow to style a <select> dropdown with only CSS?How do I check if a string contains a specific word?How to disable resizable property of textarea?Disabling Chrome Autofill

grandmas drink with lemon juice

Typsetting diagram chases (with TikZ?)

Autumning in love

Blender game recording at the wrong time

Strange behaviour of Check

Statistical model of ligand substitution

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

How do I automatically answer y in bash script?

Area of a 2D convex hull

Stars Make Stars

Windows 10: How to Lock (not sleep) laptop on lid close?

What do I do if technical issues prevent me from filing my return on time?

If A makes B more likely then B makes A more likely"

Using "nakedly" instead of "with nothing on"

What loss function to use when labels are probabilities?

How do I keep my slimes from escaping their pens?

Estimate capacitor parameters

Fishing simulator

If I can make up priors, why can't I make up posteriors?

How should I respond to a player wanting to catch a sword between their hands?

Single author papers against my advisor's will?

How do you clear the ApexPages.getMessages() collection in a test?

How to say 'striped' in Latin

3 doors, three guards, one stone



How To Control Email Recipient With Form Dropdown?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceHow do you disable browser Autocomplete on web form field / input tag?How can I prevent SQL injection in PHP?How to horizontally center a <div>?How to change an element's class with JavaScript?How to check whether a checkbox is checked in jQuery?How to prevent buttons from submitting formsHow to style a <select> dropdown with only CSS?How do I check if a string contains a specific word?How to disable resizable property of textarea?Disabling Chrome Autofill



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I am new to setting up forms. I have a form set up and sending to multiple people, but I now need it to send to multiple people that would be dependent on a dropdown list. I have searched around and can't get it to work. I am sure it is due to my lack of php knowledge. I would like the form to go to a couple of emails for each dealer they choose. So if they fill out the form, and choose "Dealer One" it would go to one set of emails and if they choose "Dealer Two" it would go to a different set of emails. Can some one help me out?



 <?php

// Set email variables


$email_to = 'ryan@example.com, ryan@example2.com, mike@example.com';


$email_subject = 'Request More Information';

// Set required fields
$required_fields = array('name','email');

// set error messages
$error_messages = array(
'name' => 'Please enter a Name to proceed.',
'email' => 'Please enter a valid Email Address to continue.',
);
// Where to redirect after form is processed.
$url = 'http://www.example.com/confirmation.html';

// Set form status
$form_complete = FALSE;

// configure validation array
$validation = array();


//.....................................................................
//dropdown email list code:



//.....................................................................



// check form submittal
if(!empty($_POST))
// Sanitise POST array
foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));

// Loop into required fields and make sure they match our needs
foreach($required_fields as $field)
// the field has been submitted?
if(!array_key_exists($field, $_POST)) array_push($validation, $field);

// check there is information in the field?
if($_POST[$field] == '') array_push($validation, $field);

// validate the email address supplied
if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);


// basic validation result
if(count($validation) == 0)
// Prepare our content string
$email_content = 'New Website Comment: ' . "nn";

// simple email content
foreach($_POST as $key => $value)
if($key != 'submit') $email_content .= $key . ': ' . $value . "n";


// if validation passed ok then send the email

$email = explode(',', $email_to);

foreach($email as $e)
$e = trim($e);
mail($e, $email_subject, $email_content);


// Update form switch
$form_complete = TRUE;



function validate_email_address($email = FALSE)
return (preg_match('/^[^@s]+@([-a-z0-9]+.)+[a-z]2,$/i', $email))? TRUE : FALSE;


function remove_email_injection($field = FALSE)
return (str_ireplace(array("r", "n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));

echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>




<label for="name">Name:</label>
<input type="name" id="name" name="name" size="25" maxlength="60" required autofocus placeholder="Name">
<label for="email">Email:</label>
<input type="email" id="email" name="email" size="25" maxlength="60" required placeholder="Email">
<label for="address">Address:</label>
<input type="address" id="address" name="address" size="25" maxlength="120" placeholder="Address">
<label for="city">City:</label>
<input type="city" id="city" name="city" size="25" maxlength="20" placeholder="City">
<label for="tel">Telephone:</label>
<input type="tel" id="tel" name="tel" size="25" maxlength="18" placeholder="Telephone">

<!--surround the select box with a "custom-select" DIV element. Remember to set the width:-->
<div class="custom-select" style="width:80%;">
<label for="select">Select A Dealer</label>
<select name="select_a_dealer" required="required" id="select_a_dealer" form="request_a_quote" >
<option value="0">Select A Dealer</option>
<option value="1">Dealer One - City One</option>
<option value="2">Dealer Two - City Two</option>
<option value="3">Dealer Three - City Three</option>

</div>

<input type="submit" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">
<input type="reset" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">





</form>









share|improve this question




























    1















    I am new to setting up forms. I have a form set up and sending to multiple people, but I now need it to send to multiple people that would be dependent on a dropdown list. I have searched around and can't get it to work. I am sure it is due to my lack of php knowledge. I would like the form to go to a couple of emails for each dealer they choose. So if they fill out the form, and choose "Dealer One" it would go to one set of emails and if they choose "Dealer Two" it would go to a different set of emails. Can some one help me out?



     <?php

    // Set email variables


    $email_to = 'ryan@example.com, ryan@example2.com, mike@example.com';


    $email_subject = 'Request More Information';

    // Set required fields
    $required_fields = array('name','email');

    // set error messages
    $error_messages = array(
    'name' => 'Please enter a Name to proceed.',
    'email' => 'Please enter a valid Email Address to continue.',
    );
    // Where to redirect after form is processed.
    $url = 'http://www.example.com/confirmation.html';

    // Set form status
    $form_complete = FALSE;

    // configure validation array
    $validation = array();


    //.....................................................................
    //dropdown email list code:



    //.....................................................................



    // check form submittal
    if(!empty($_POST))
    // Sanitise POST array
    foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));

    // Loop into required fields and make sure they match our needs
    foreach($required_fields as $field)
    // the field has been submitted?
    if(!array_key_exists($field, $_POST)) array_push($validation, $field);

    // check there is information in the field?
    if($_POST[$field] == '') array_push($validation, $field);

    // validate the email address supplied
    if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);


    // basic validation result
    if(count($validation) == 0)
    // Prepare our content string
    $email_content = 'New Website Comment: ' . "nn";

    // simple email content
    foreach($_POST as $key => $value)
    if($key != 'submit') $email_content .= $key . ': ' . $value . "n";


    // if validation passed ok then send the email

    $email = explode(',', $email_to);

    foreach($email as $e)
    $e = trim($e);
    mail($e, $email_subject, $email_content);


    // Update form switch
    $form_complete = TRUE;



    function validate_email_address($email = FALSE)
    return (preg_match('/^[^@s]+@([-a-z0-9]+.)+[a-z]2,$/i', $email))? TRUE : FALSE;


    function remove_email_injection($field = FALSE)
    return (str_ireplace(array("r", "n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));

    echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    ?>




    <label for="name">Name:</label>
    <input type="name" id="name" name="name" size="25" maxlength="60" required autofocus placeholder="Name">
    <label for="email">Email:</label>
    <input type="email" id="email" name="email" size="25" maxlength="60" required placeholder="Email">
    <label for="address">Address:</label>
    <input type="address" id="address" name="address" size="25" maxlength="120" placeholder="Address">
    <label for="city">City:</label>
    <input type="city" id="city" name="city" size="25" maxlength="20" placeholder="City">
    <label for="tel">Telephone:</label>
    <input type="tel" id="tel" name="tel" size="25" maxlength="18" placeholder="Telephone">

    <!--surround the select box with a "custom-select" DIV element. Remember to set the width:-->
    <div class="custom-select" style="width:80%;">
    <label for="select">Select A Dealer</label>
    <select name="select_a_dealer" required="required" id="select_a_dealer" form="request_a_quote" >
    <option value="0">Select A Dealer</option>
    <option value="1">Dealer One - City One</option>
    <option value="2">Dealer Two - City Two</option>
    <option value="3">Dealer Three - City Three</option>

    </div>

    <input type="submit" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">
    <input type="reset" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">





    </form>









    share|improve this question
























      1












      1








      1








      I am new to setting up forms. I have a form set up and sending to multiple people, but I now need it to send to multiple people that would be dependent on a dropdown list. I have searched around and can't get it to work. I am sure it is due to my lack of php knowledge. I would like the form to go to a couple of emails for each dealer they choose. So if they fill out the form, and choose "Dealer One" it would go to one set of emails and if they choose "Dealer Two" it would go to a different set of emails. Can some one help me out?



       <?php

      // Set email variables


      $email_to = 'ryan@example.com, ryan@example2.com, mike@example.com';


      $email_subject = 'Request More Information';

      // Set required fields
      $required_fields = array('name','email');

      // set error messages
      $error_messages = array(
      'name' => 'Please enter a Name to proceed.',
      'email' => 'Please enter a valid Email Address to continue.',
      );
      // Where to redirect after form is processed.
      $url = 'http://www.example.com/confirmation.html';

      // Set form status
      $form_complete = FALSE;

      // configure validation array
      $validation = array();


      //.....................................................................
      //dropdown email list code:



      //.....................................................................



      // check form submittal
      if(!empty($_POST))
      // Sanitise POST array
      foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));

      // Loop into required fields and make sure they match our needs
      foreach($required_fields as $field)
      // the field has been submitted?
      if(!array_key_exists($field, $_POST)) array_push($validation, $field);

      // check there is information in the field?
      if($_POST[$field] == '') array_push($validation, $field);

      // validate the email address supplied
      if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);


      // basic validation result
      if(count($validation) == 0)
      // Prepare our content string
      $email_content = 'New Website Comment: ' . "nn";

      // simple email content
      foreach($_POST as $key => $value)
      if($key != 'submit') $email_content .= $key . ': ' . $value . "n";


      // if validation passed ok then send the email

      $email = explode(',', $email_to);

      foreach($email as $e)
      $e = trim($e);
      mail($e, $email_subject, $email_content);


      // Update form switch
      $form_complete = TRUE;



      function validate_email_address($email = FALSE)
      return (preg_match('/^[^@s]+@([-a-z0-9]+.)+[a-z]2,$/i', $email))? TRUE : FALSE;


      function remove_email_injection($field = FALSE)
      return (str_ireplace(array("r", "n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));

      echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
      ?>




      <label for="name">Name:</label>
      <input type="name" id="name" name="name" size="25" maxlength="60" required autofocus placeholder="Name">
      <label for="email">Email:</label>
      <input type="email" id="email" name="email" size="25" maxlength="60" required placeholder="Email">
      <label for="address">Address:</label>
      <input type="address" id="address" name="address" size="25" maxlength="120" placeholder="Address">
      <label for="city">City:</label>
      <input type="city" id="city" name="city" size="25" maxlength="20" placeholder="City">
      <label for="tel">Telephone:</label>
      <input type="tel" id="tel" name="tel" size="25" maxlength="18" placeholder="Telephone">

      <!--surround the select box with a "custom-select" DIV element. Remember to set the width:-->
      <div class="custom-select" style="width:80%;">
      <label for="select">Select A Dealer</label>
      <select name="select_a_dealer" required="required" id="select_a_dealer" form="request_a_quote" >
      <option value="0">Select A Dealer</option>
      <option value="1">Dealer One - City One</option>
      <option value="2">Dealer Two - City Two</option>
      <option value="3">Dealer Three - City Three</option>

      </div>

      <input type="submit" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">
      <input type="reset" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">





      </form>









      share|improve this question














      I am new to setting up forms. I have a form set up and sending to multiple people, but I now need it to send to multiple people that would be dependent on a dropdown list. I have searched around and can't get it to work. I am sure it is due to my lack of php knowledge. I would like the form to go to a couple of emails for each dealer they choose. So if they fill out the form, and choose "Dealer One" it would go to one set of emails and if they choose "Dealer Two" it would go to a different set of emails. Can some one help me out?



       <?php

      // Set email variables


      $email_to = 'ryan@example.com, ryan@example2.com, mike@example.com';


      $email_subject = 'Request More Information';

      // Set required fields
      $required_fields = array('name','email');

      // set error messages
      $error_messages = array(
      'name' => 'Please enter a Name to proceed.',
      'email' => 'Please enter a valid Email Address to continue.',
      );
      // Where to redirect after form is processed.
      $url = 'http://www.example.com/confirmation.html';

      // Set form status
      $form_complete = FALSE;

      // configure validation array
      $validation = array();


      //.....................................................................
      //dropdown email list code:



      //.....................................................................



      // check form submittal
      if(!empty($_POST))
      // Sanitise POST array
      foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));

      // Loop into required fields and make sure they match our needs
      foreach($required_fields as $field)
      // the field has been submitted?
      if(!array_key_exists($field, $_POST)) array_push($validation, $field);

      // check there is information in the field?
      if($_POST[$field] == '') array_push($validation, $field);

      // validate the email address supplied
      if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);


      // basic validation result
      if(count($validation) == 0)
      // Prepare our content string
      $email_content = 'New Website Comment: ' . "nn";

      // simple email content
      foreach($_POST as $key => $value)
      if($key != 'submit') $email_content .= $key . ': ' . $value . "n";


      // if validation passed ok then send the email

      $email = explode(',', $email_to);

      foreach($email as $e)
      $e = trim($e);
      mail($e, $email_subject, $email_content);


      // Update form switch
      $form_complete = TRUE;



      function validate_email_address($email = FALSE)
      return (preg_match('/^[^@s]+@([-a-z0-9]+.)+[a-z]2,$/i', $email))? TRUE : FALSE;


      function remove_email_injection($field = FALSE)
      return (str_ireplace(array("r", "n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));

      echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
      ?>




      <label for="name">Name:</label>
      <input type="name" id="name" name="name" size="25" maxlength="60" required autofocus placeholder="Name">
      <label for="email">Email:</label>
      <input type="email" id="email" name="email" size="25" maxlength="60" required placeholder="Email">
      <label for="address">Address:</label>
      <input type="address" id="address" name="address" size="25" maxlength="120" placeholder="Address">
      <label for="city">City:</label>
      <input type="city" id="city" name="city" size="25" maxlength="20" placeholder="City">
      <label for="tel">Telephone:</label>
      <input type="tel" id="tel" name="tel" size="25" maxlength="18" placeholder="Telephone">

      <!--surround the select box with a "custom-select" DIV element. Remember to set the width:-->
      <div class="custom-select" style="width:80%;">
      <label for="select">Select A Dealer</label>
      <select name="select_a_dealer" required="required" id="select_a_dealer" form="request_a_quote" >
      <option value="0">Select A Dealer</option>
      <option value="1">Dealer One - City One</option>
      <option value="2">Dealer Two - City Two</option>
      <option value="3">Dealer Three - City Three</option>

      </div>

      <input type="submit" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">
      <input type="reset" class="btn btn-danger" style="border-radius; .3rem; font-size:14px; padding:.5rem; margin:10px; width:30%; display:block">





      </form>






      php html forms






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 15:09









      rsalwayrsalway

      83




      83






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Construct an array in your code that contains the addresses you want to use for dealer 1, dealer 2, etc then simply index into that array using the value selected by the select_a_dealer select on your form.



          $dealersto = [
          1=>['joe@example.com','sam@example.com'],
          2=>['bob@example.com','sue@example.com']
          ];


          In the code that sends the mail use the posted value of select_a_dealer as the key into the array to set the to address of the email.






          share|improve this answer























          • Dave thank you for your response. Is there any way you can break this down a little for me? I am very new to this.

            – rsalway
            Mar 8 at 17:56











          • Edit your question and add the code that is sending the mail. Just need the bit around where the to address is set.

            – Dave
            Mar 8 at 18:01











          • I got it to work. Thank you. I took some of what you gave me and some code I found. I appreciate your help.

            – rsalway
            Mar 11 at 10:10











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066000%2fhow-to-control-email-recipient-with-form-dropdown%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Construct an array in your code that contains the addresses you want to use for dealer 1, dealer 2, etc then simply index into that array using the value selected by the select_a_dealer select on your form.



          $dealersto = [
          1=>['joe@example.com','sam@example.com'],
          2=>['bob@example.com','sue@example.com']
          ];


          In the code that sends the mail use the posted value of select_a_dealer as the key into the array to set the to address of the email.






          share|improve this answer























          • Dave thank you for your response. Is there any way you can break this down a little for me? I am very new to this.

            – rsalway
            Mar 8 at 17:56











          • Edit your question and add the code that is sending the mail. Just need the bit around where the to address is set.

            – Dave
            Mar 8 at 18:01











          • I got it to work. Thank you. I took some of what you gave me and some code I found. I appreciate your help.

            – rsalway
            Mar 11 at 10:10















          0














          Construct an array in your code that contains the addresses you want to use for dealer 1, dealer 2, etc then simply index into that array using the value selected by the select_a_dealer select on your form.



          $dealersto = [
          1=>['joe@example.com','sam@example.com'],
          2=>['bob@example.com','sue@example.com']
          ];


          In the code that sends the mail use the posted value of select_a_dealer as the key into the array to set the to address of the email.






          share|improve this answer























          • Dave thank you for your response. Is there any way you can break this down a little for me? I am very new to this.

            – rsalway
            Mar 8 at 17:56











          • Edit your question and add the code that is sending the mail. Just need the bit around where the to address is set.

            – Dave
            Mar 8 at 18:01











          • I got it to work. Thank you. I took some of what you gave me and some code I found. I appreciate your help.

            – rsalway
            Mar 11 at 10:10













          0












          0








          0







          Construct an array in your code that contains the addresses you want to use for dealer 1, dealer 2, etc then simply index into that array using the value selected by the select_a_dealer select on your form.



          $dealersto = [
          1=>['joe@example.com','sam@example.com'],
          2=>['bob@example.com','sue@example.com']
          ];


          In the code that sends the mail use the posted value of select_a_dealer as the key into the array to set the to address of the email.






          share|improve this answer













          Construct an array in your code that contains the addresses you want to use for dealer 1, dealer 2, etc then simply index into that array using the value selected by the select_a_dealer select on your form.



          $dealersto = [
          1=>['joe@example.com','sam@example.com'],
          2=>['bob@example.com','sue@example.com']
          ];


          In the code that sends the mail use the posted value of select_a_dealer as the key into the array to set the to address of the email.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 8 at 15:46









          DaveDave

          2,94081830




          2,94081830












          • Dave thank you for your response. Is there any way you can break this down a little for me? I am very new to this.

            – rsalway
            Mar 8 at 17:56











          • Edit your question and add the code that is sending the mail. Just need the bit around where the to address is set.

            – Dave
            Mar 8 at 18:01











          • I got it to work. Thank you. I took some of what you gave me and some code I found. I appreciate your help.

            – rsalway
            Mar 11 at 10:10

















          • Dave thank you for your response. Is there any way you can break this down a little for me? I am very new to this.

            – rsalway
            Mar 8 at 17:56











          • Edit your question and add the code that is sending the mail. Just need the bit around where the to address is set.

            – Dave
            Mar 8 at 18:01











          • I got it to work. Thank you. I took some of what you gave me and some code I found. I appreciate your help.

            – rsalway
            Mar 11 at 10:10
















          Dave thank you for your response. Is there any way you can break this down a little for me? I am very new to this.

          – rsalway
          Mar 8 at 17:56





          Dave thank you for your response. Is there any way you can break this down a little for me? I am very new to this.

          – rsalway
          Mar 8 at 17:56













          Edit your question and add the code that is sending the mail. Just need the bit around where the to address is set.

          – Dave
          Mar 8 at 18:01





          Edit your question and add the code that is sending the mail. Just need the bit around where the to address is set.

          – Dave
          Mar 8 at 18:01













          I got it to work. Thank you. I took some of what you gave me and some code I found. I appreciate your help.

          – rsalway
          Mar 11 at 10:10





          I got it to work. Thank you. I took some of what you gave me and some code I found. I appreciate your help.

          – rsalway
          Mar 11 at 10:10



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066000%2fhow-to-control-email-recipient-with-form-dropdown%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          1928 у кіно

          Захаров Федір Захарович

          Ель Греко