I am using php 5 with apache 2.2 under win xp pro.
I am using the following PHP script to send email,
but I get the error(shown in the error.log of apache)
[Sat Jun 14 13:41:37 2008] [error] [client 127.0.0.1] PHP Warning: mail() [<a href='function.mail'>funct
a>]: SMTP server response: 550 5.7.1 Unable to relay for firstname.lastname@example.org in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htd
.php on line 8
(Note that in my case I have replaced email@example.com as the my own email).
May I know how to resolve this problem?
$to = "firstname.lastname@example.org";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "email@example.com";
$headers = "From: $from";
echo "Mail Sent.";