PHP mail funtcion not working

Hello guys i am using PHP mail() function but it is not working don’t know what is wrong with the code kindly help me out.

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.";

$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;
{ echo “mail sent”;}
else {
echo “failed”;}
//echo “Thanks for submitting your comments”;

What happens, does it act like the mail is being sent but it’s not?

Or does it say “failed”

It’s much easier to include and use phpmailer, it actually gives you error messages… ^^

Sponsor our Newsletter | Privacy Policy | Terms of Service