Contact form is not sending email

Hello, i m trying to send query by contact us form but i m facing the problem that is when i click on submit this is showing thanks but mail is not sending to my email id please help me if u can.

Thanks

this is my script

[php]<?php
function spamcheck($field)
{
//filter_var() sanitizes the e-mail
//address using FILTER_SANITIZE_EMAIL
$field=filter_var($field, FILTER_SANITIZE_EMAIL);

//filter_var() validates the e-mail
//address using FILTER_VALIDATE_EMAIL
if(filter_var($field, FILTER_VALIDATE_EMAIL))
{
return TRUE;
}
else
{
return FALSE;
}
}

if (isset($_REQUEST[‘email’]))
{//if “email” is filled out, proceed

//check if the email address is invalid
$mailcheck = spamcheck($_REQUEST[‘email’]);
if ($mailcheck==FALSE)
{
echo “Invalid input”;
}
else
{//send email
$email = $_REQUEST[‘email’] ;
$subject = $_REQUEST[‘subject’] ;
$message = $_REQUEST[‘message’] ;
mail("[email protected]", “Subject: $subject”,
$message, “From: $email” );
echo “Thanks”;
}
}
else
{//if “email” is not filled out, display the form
echo “Not sent”;
}
?>[/php]

are you sure $_REQUEST holds the info you want?

try changing this section of code:
[php]
//send email
$email = $_REQUEST[‘email’] ;
$subject = $_REQUEST[‘subject’] ;
$message = $_REQUEST[‘message’] ;
mail("[email protected]", “Subject: $subject”,
$message, “From: $email” );
echo “Thanks”;
[/php]

to this:
[php] //send email
var_dump($_REQUEST);
die();
$email = $_REQUEST[‘email’] ;
$subject = $_REQUEST[‘subject’] ;
$message = $_REQUEST[‘message’] ;
mail("[email protected]", “Subject: $subject”,
$message, “From: $email” );
echo “Thanks”;[/php]

temporarily, this is just to make sure your data is being passed. if email, subject, and message are blank it won’t send.

Sponsor our Newsletter | Privacy Policy | Terms of Service