I have a form email script that uses PHP mail() on my website that allows other members to receive site notifications and allows members to contact other members on behalf of our site.
I am noticing that messages sent to hotmail (and probably other places), are not being received and are not being bounced back.
I set up a Squirrel Mail account managed on Dreamhost and manually sent a message from there, and that message went through to hotmail.
Why is Squirrel mail working, but PHP mail() not working? Squirrel mail is not an option for automated notifications on my site from other members.
Here is my PHP mail() script:
[php]$messages = wordwrap($_POST['message'], 70);
$subject = $_POST['subject'];
$receiver = $_POST['receiver'];
$to = $receiver;
$headers = "From: My Company firstname.lastname@example.org\r\n";
$headers = "Reply-To: email@example.com";
$sentmail = mail($to,$subject,$messages,$headers,"-firstname.lastname@example.org");[/php]
Is there something I need to add to this script to get it working right?
EDIT: I've also tried PHPMailer and that still doesn't seem to work for getting messages to hotmail.