can anyone tell me why i dont recieve mail?

Hi guys, im having a really difficult time recieving any emails from my contact form. I got the contact work working perfectly, when you fill the fields out and select ‘submit’ it does just that, and confirms it with’Thankyou, your message was sent’ however, when i check my email, i dont ever recieve anything from it! Im at a loss, i must have tried a hundred times, but still nothing.

this is the code im currently using for my contact.php, can you see anything wrong with it: -


$your_company = $_GET['company'];
$your_name = $_GET['name'];
$your_phone = $_GET['phone'];
$your_email = $_GET['email'];
$your_message = $_GET['message'];

$recipient_email = "[email protected]";

$subject = "from " . $your_email;
$headers = “From: " . $your_name . " <” . $your_email . “>n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’;

$content = "<html><head><title>Contact letter</title></head><body>

$content .= "Company: " . $your_company . "
$content .= "Name: " . $your_name . "
$content .= "Phone: " . $your_phone . "
$content .= "E-mail: " . $your_email . "

$content .= $your_message;
$content .= "

 mail($recipient_email,$subject,$content,$headers, "[email protected]");


Your message was sent. Thank you.

im ripping me hair out, trying to get this to work and im at a complete loss. Many thanxs. :D

Mod Edit: Added PHP tags for readability

The mail() function returns a status. Why don’t you check for that status?

How would i do that Zyppora, sorry, i have very little understanding of php. Its embarrasing. Im just trying to get a contact form froma flash template working. It says 'message sent ’ evertime i visit the site and submit a test message, but i never receive anymail. Its soo frustrating. :D

You will need to do an if statement…

if(!mail($to, $subject, $body, $headers)) { echo "Message Failed!"; } else { echo "Message Sent Successfully!"; }

lol fantastic, what would i do with that code, do i open a new .php file and paste that in it? if so what should i save the file as? does it matter. Many thanxs. :D

I too am a php noob (I have posted a q here now) but you would just add that in to your current script.

What it is saying is that: If all of the fields are sent correctly it says: “Message Sent” otherwise if it fails it says “message fails”

Hope this will help you,


Sponsor our Newsletter | Privacy Policy | Terms of Service