<?php
$data = json_decode( $_POST['data']);
$emailSubject = "Новая заявка " . $data->price;
$emailBody = "\n\nДанные по заявке:\n\n";
$emailBody .= "Имя: " . $data->name "\r\n";
$resultOfMail = mail("vyacheslav.y@live.ru", $emailSubject, $emailBody, $headers);
$out = array( "success" => $resultOfMail);
echo json_encode( $out);