title: on form submit send email+open pop up
body: <p>I have a form which on submit should open a window and also send form data to email.</p>
  
  <pre><code>&lt;form action="" method="post" id="form" onsubmit="paymentfunc();return false;"&gt;
  </code></pre>
  
  <p>Submit button</p>
  
  <pre><code>&lt;input type="submit" value="Purchase" class="btn" id="submit" name="submit"&gt;
  </code></pre>
  
  <p>I have all the php code to send form data to email is written in the same file as that of form html.
  Problem is that any one of the two actions are happening. How to make both happen?</p>