title: Send email with Ajax in Wordpress
body: <p>i an new to wordpress theme development, i need to send an email with ajax/PHP in wordpress </p>
  
  <pre><code>var dataString =    'name=' + name + 
          '&amp;email=' + email + 
          '&amp;contact=' + contact + 
          '&amp;technology=' + technology +
          '&amp;budget=' + budget +
          '&amp;details=' + details;          
  
     alert(dataString);
  
  
     $.ajax({  
     type: "POST",  
     url: "&lt;?php bloginfo('template_url'); ?&gt;/qoute-sent.php",  
     data: {name:'anas', Email: 'anas@yahoo.com'},
     datatype: "html",  
     success: function() {  
     alert(sent);
     } 
  </code></pre>
  
  <p>all the code work till <code>alert(dataString);</code> but after that ajax does not works.... </p>
  
  <p>this is my php file code</p>
  
  <pre><code>    $name=$_POST['name'];
      $email=$_POST['email'];
     // $contact=$_POST['contact'];
     //$technology=$_POST['technology'];
    // $budget=$_POST['budget'];
    //$details=$_POST['details'];
  
     //-------------for email setup----------------------------
     $to = "stylegurupk@gmail.com";
     //------------------------------------------
     $message = " \n " .
  
     "Name ".$name." \n " .
     "Email : ".$email." \n " ;
  
      //---------------------------------- 
      $subject = "MWM Qoute Request"; 
      $headers =  'From: '.$email . "\r\n" .
      'Reply-To: '.$to . "\r\n" .
      'X-Mailer: PHP/' . phpversion();
      //echo "TO : ".$to."&lt;br&gt;";
      //echo "FROM : ".$email."&lt;br&gt;";
      //echo "&lt;br&gt;".$message;
      mail($to, $subject,$message,$headers);
  </code></pre>