メールが届かないのですが、何が問題なのですか?
ui.js
sendEmail = function(username, callback) {
  var msg = getMessage(username);
  $.ajax({
   type: 'POST',
   url: 'ui.php', 
   data: '***What should I type here ?***', 
   success: callback
  });
ui.php
<?php
$to = "XXXXXX@gmail.com";
$subject = "you got mail";
$message = $_POST['getMessage'];
$send = @mail($to, $subject, $message);
if(!$send){    
    die();  
}
?>