ajax php

ajax php

Hey everyone, i'm trying to make a simple contact form that sends data to a php mailing script using ajax...
I can't get it to work, here's what i've got:

phpmailer.php
  1. <?php
  2. $emailTo = $_POST['emailTo'];
  3. $subject = $_POST['subject'];
  4. $message = $_POST['message'];
  5.            
  6. mail($emailTo, $subject, $message);
  7. ?>
form.js
  1. $.post("control/php/sendemail.php",
  2.          { emailTo: 'my@email.com', subject: email, message: message },
  3.                  function(data){
  4.                  alert('sent');
  5.           }
  6.   );
basically the post function is contained a $.('button").click() so that it is fired when the submit button is clicked. Firebug say that everythink was successful but the email just wont send!! Any ideas??