I am using the following code to send an e-mail to a mailing list, using flat text files as a list of subscribers. Here's the code for sending the e-mail, that doesn't seem to work.
for ($index=0; $index < count($addresses); $index++)
{
$Subject=stripslashes($Subject);
$Body=stripslashes($Body);
$mailheaders = "From: Me\r\n";
$mailheaders .= "Reply-To: me@mydomain.com\r\n";
mail("$addresses[$index]", "$Subject", "$Body", "$mailheaders", "-fme@mydomain.com");
}
The problem : none of the headers, other than $addresses[$index ] get passed as headers. The rest is displayed as the body. I have tried using different clients on different OSs, and it still gives the same result. (Using the fifth param at least gives the e-mail the correct adress... otherwise it shows "Nobody <nobody@mydomain.com>" in the From field).
This is script is hosted on a university server (solaris 8) so I don't have access to make sure that sendmail is properly configured.
Any other ideas what this could be?