The AJAX portion is
Code:
function emailXMLDoc(){
var emailText = "TITLE:,Pending Order sent to Paypal";
var x=document.getElementById("PurchaseOrder");
for (var i=16;i<x.length-9;i++){
emailText += "\n"+x.elements[i].id+","+x.elements[i].value;
}
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("POST","ASP/PostOrderEmail.php",true);
xmlhttp.setRequestHeader("submitteremail",document.forms[0].email.value,"body",emailText);
xmlhttp.send();
};
The PostOrderEmail.php is very simple

Code:
<?php

$messagetoadmin = $HTTP_POST_VARS['submitteremail'] ." has passed this information to Paypal:

";
$messagetoadmin .= $HTTP_POST_VARS['body'];

mail('sales@Yandina.com', 'Form Submitted: Pending Order', $messagetoadmin, 'From: '. $HTTP_POST_VARS['submitteremail']);
?>
An alert in the AJAX code shows the message is good but the email doesn't arrive .