View Single Post
Old 04-28-2009, 05:44 PM   #1 (permalink)
shankar
The Wanderer
 
Join Date: Apr 2009
Posts: 19
Thanks: 9
shankar is on a distinguished road
Default sending mails from wamp server

<?php
$to = $_POST['address'];
$subject = "Email from websitename.com";
$name = $_POST['name'];
$headers = "From: admin@websitename.com";
if ($name&&$to)
{
$message = "If you are able to view this message, then your request for a confirmatory email was successful.\n \t <a href='http://localhost/phpmyresources/addacc.php'>Click here to register yourself</a>";
$body = "Hello $name \n\n\t $message";
mail($to, $subject, $body, $headers);

}
?>
<br>Email sent <br><br><a href="send_email.php">Back</a>

But the output says mail sending failed, what to do?
__________________
--
Regards
Shankar
shankar is offline  
Reply With Quote