PHP mail funtcion not working

Hello guys i am using this script as my mail sending script but it not sending the mail to the email id kindly help me with it

[code]<?php
$name=($_POST[‘name’]);
$email=($_POST[‘email’]);
$phone=($_POST[‘phone’]);
$bid=($_POST[‘bid’]);
$server=($POST[‘server’]);
if (!ereg("^[a-zA-Z0-9
]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$", $email))
{
echo “That is not a valid email address. Please return to the”
." previous page and try again.";
exit;
}

else{
$to = "[email protected]";
$subject = “Request From Domain:: “. $server;
//echo $headers;
$headers = “MIME-Version: 1.0 \r\n”;
$headers .= “From: “”.$name.”” <”.$email. “>\r\n”;
$headers .= “Content-type: text/html; charset=iso-8859-1 \r\n”;

$message = ’

"Request For Domain: '.$server."
\n" ."Name: ".$name."
\n" ."Email: ".$email."
\n" ."Phone: ".$phone. "
\n" ."Bid: ".$bid. '
'; $mail = mail($to, $subject, $message, $headers);

echo $message;
if($mail)
{ echo “mail sent”;}
else {
echo “failed”;}
//echo “Thanks for submitting your comments”;
}
?>
[/code]

Use phpmailer or the like for sending html enabled mail. Mail() is for sending simple mail messages.

Sponsor our Newsletter | Privacy Policy | Terms of Service