I can't send e-mail to outside of my domain using basic php mail function.It shows error when i want to send e-mail to yahoo or gmail or outside of my domain.The error is:Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay in C:\-----\email.php on line 6.My code is below.
$to = "testabc@gmail.com";
$subject = "Hi!";
$body = "Hi,
How are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
My e-mail server is Microsoft exchange server 2007. Is their any well stablished php class or code available to send email.
pls help