Hello,
The content-type header must be present and set to text/plain for php mail to work. Here's a copy of a script I know to work on all free servers. Maybe you can adapt it to what you need:
Code:
<?php
$to = 'them@example.com' . ', ';
$subject = 'Subject here';
$message = '
Enter message body
';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n";
$headers .= 'To: First Last <them@example.com>' . "\r\n";
$headers .= 'From: First Last <you@example.com>' . "\r\n";
if (mail($to,$subject,$message,$headers) ) {
echo "email sent";
} else {
echo "email couldn't be sent";
};
?>
Also, you need to ensure any messages are sent from an address that actually exists in your cPanel.