I have written below code getting error while executing.
<?php
$to = "somebody@example.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "
" .
"CC: somebodyelse@example.com";
$retval = mail($to,$subject,$txt,$headers);
if( $retval == true ) {
echo "Message sent successfully...";
}else {
echo "Message could not be sent...";
}
?>
URL : http://www.casaplaya.co.za/test-email.php
Message could not be sent... PHP Warning: mail(E:\IIS\LogFiles\PHP\php53mail.log): failed to open stream: Permission denied in F:\domains\casaplaya.co.za\wwwroot\test-email.php on line 18 PHP Warning: mail(): SMTP server response: 550 No such user here in F:\domains\casaplaya.co.za\wwwroot\test-email.php on line 18
I am unable to figure out the the issue. It will be great if anybody help me to find out the solution.
Thanks in advance.