title: PHP email is sending twice when form is submitted
body: <p>I set up a custom price quote feature that sends the user an email when they click submit. The issue I'm having is that even if you hit 'Submit' once, it always sends two emails. I'm using this on a a WordPress site and this code is part of the price quote plugin that I wrote. </p>
  
  <p>I set up a variable called <code>$testemail</code> that is set to 1, and is supposed to increment by 1 when the <code>wp_mail</code> function is called, but both emails are still showing just the number 1 so the second email doesn't increment it at all.</p>
  
  <p>Here's my code that is sending the email:</p>
  
  <pre><code>$email_array = array($get_option_array['franchise_email'], 
  $email_address_sanitize, "info@example.com");
  $subject = "Price Quote Submission";
  $to = $email_array;
    if (isset($_POST['submit-clicked'])) {
        if ($check_human_clean != 2) {
          echo '&lt;div&gt;';
          echo '&lt;p class="error"&gt;Human verfication is incorrect. Please try again.&lt;/p&gt;';
          echo '&lt;/div&gt;';
        }
        else {
          if (wp_mail($to, $subject, $message)) {
            echo '&lt;div id="dialog" title="Price Quote Submitted"&gt;';
            echo 'div id="popmake-233"&gt;';
            echo '&lt;p&gt;Your price quote has been sent successfuly. We\'ll be in touch shortly. If you don\'t hear from us, please give us a call directly at (909) 982-9999. Thank you!&lt;/p&gt;';
            echo '&lt;/div&gt;';
            $testemail++;
          }
          else {
            echo '&lt;p class="error"&gt;An error occured while processing your price quote. Please contact the franchise owner at ';
            echo $get_option_array['franchise_phone'];
            echo '&lt;/p&gt;';
          }
        }
      }
  </code></pre>
  
  <p>Everything I've read is that the code must be run twice, but my <code>$testemail</code> variable isn't incrementing so I'm not sure that's the case. Also, I'm using SendGrid but I already tried turning off SendGrid and that didn't solve the issue. Other than that, it's just using the <code>wp_mail</code> default function, which I believe uses PHP Mailer. </p>
  
  <p>I'm a junior developer so I'm sure I'm just overlooking something, but I'm stumped at this point. Any help would be great, thanks.</p>