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 email@example.com in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htd
.php on line 8
(Note that in my case I have replaced firstname.lastname@example.org as the my own email).
May I know how to resolve this problem?
$to = "email@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "firstname.lastname@example.org";
$headers = "From: $from";
echo "Mail Sent.";