Thanks, Anshul, but I had cut-and-pasted your reply and used it after changing the appropriate email addresses and adding the $to, $subject and $message fields:
------------
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "To: Me <
[email protected]>\r\n";
$headers .= "From: Me <
[email protected]>\r\n";
$headers .= "Cc:
[email protected]\r\n";
/* email details */
$to = "
[email protected]";
$subject = "PHP Mail Test from manual";
$message = "This is from a message on the p2p forum<br />";
$message .= "This should be the second line<br />";
/* and now mail it */
mail($to, $subject, $message, $headers);
------------
Sent from localhost, the message came through fine:
------------
This is from a message on the p2p forum
This should be the second line
------------
Sent through the webserver, the message came through:
------------
Content-type: text/html; charset=iso-8859-1 To: Me <
[email protected]>
From: Me <
[email protected]>
Cc:
[email protected]
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: BASE64
VGhpcyBpcyBmcm9tIGEgbWVzc2FnZSBvbiB0aGUgcDJwIGZvcn VtPGJyIC8+VGhpcyBzaG91bGQg YmUgdGhlIHNlb25kIGxpbmU8YnIgLz48YnIgLz48aHIgLz4=
------------
However, when I looked at the headers I noticed:
"Message-ID: <
[email protected]>"
The PHP manual states, "If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them," so it is a difference in servers. The web server is apparently using qmail, and I need to start looking at qmail "sendmail wrappers".
Anyway, maybe this will be of use to someone else with the same problem.