Contact Form not Sending Emails

I have a simple php contact form.

Upon clicking “Send” the message displays “Your message has been sent successfully!” but no email is received. I’ve changed the email in the code multiple times, but the same result (or lack thereof).

Here is the php code:[php]<?php

$receiverMail = "[email protected]"; /* Your email */

$name = ltrim(rtrim(strip_tags(stripslashes($_POST[‘name’]))));

$email = ltrim(rtrim(strip_tags(stripslashes($_POST[‘email’]))));

$website = ltrim(rtrim(strip_tags(stripslashes($_POST[‘website’]))));

$msg = ltrim(rtrim(strip_tags($_POST[‘msg’])));

$subject = $name ." - ".$website;

$ip = getenv(“REMOTE_ADDR”);

$msgformat = “From: $name ($ip)\nEmail: $email\n\n$msg”; /* MSG format */


if(empty($name) || empty($email) || empty($website) || empty($msg)) {

echo "<div id='status' class='error'>The email was not sent. Please fill all the required fields</div>";


elseif(!ereg("^[_a-z0-9-]+(.[_a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)(.[a-z]{2,3})$", $email)) {

echo "<div id='status'  class='error'>The email was not sent. The email address is invalid</div>";


else {

mail($receiverMail, $subject, $msgformat, "From: $name <$email>");

echo "<div id='status'  class='ok'>Your message has been sent successfully!</div"; }


It’s hosted on godaddy linux account with php 5.2

Thanks in advance.

this one would be the same as this one maybe ?

Sponsor our Newsletter | Privacy Policy | Terms of Service