email send through php wamp server?

Mit Chauhan

New member
hello ..

m using WAMP SERVER and working on php ..

here m trying to send mail using php but m getting error .. here is my code ..

--------------------------------------------------------
email simple.php
----------------
<?php
$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "[email protected]";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";


?>
--------------------------------------------------------

but m not able to receive any mail and m getting this error . .

--------------------------------
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [email protected] in C:\wamp\www\websites\Email validation\email simple.php
--------------------------------

tell me how can i come out of this ..

any help would be so appreciated .. thanks a lott ..
 
Back
Top