Я не думаю, что вам нужно JSON привести данные в строку, просто обновите переменную mydata и удалите JSON .stringify
var mydata = {'personName':name, 'subjectName':name, 'commentArea':comments};
$.ajax({
type: "POST",
url: "check_and_send_mail.php",
data: mydata,
dataType: "json",
success : function(data){
// here data is a response
},
error : function(xhr, status, error){
// handle error
}
});
, затем из PHP вы можете отправить ответ
$response = true; // Just a true response for now
// Send the response
header('Access-Control-Allow-Origin:*');
ob_clean();
echo json_encode($response);
die();