Jump to content


This topic is now archived and is closed to further replies.



Recommended Posts

I have a problem with this form. I tried using this form to be posted from my website, it works fine on one server meaning, I receive the email when the 'TO' address is 'xyz@email.com', but on another server, where the email address is 'lmn@help.com', i dont receive the email.

Can anybody tell me what the problem is? I need to get this working on the server which I dont receive this form.
The code:

$request = array_map('trim',($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET) ;

//check for spam injection
$allfields = implode('',$request) ;
$nontext = $request ;
unset($nontext['message'] );
$nontextfields = implode ('',$nontext) ;
if ((strpos ($nontextfields,"\\r")!==false) ||
(strpos ($nontextfields,"\\n")!==false) ||
(strpos ($allfields,"Content-Transfer-Encoding")!==false) ||
(strpos ($allfields,"MIME-Version")!==false) ||
(strpos ($allfields,"Content-Type")!==false) ||
($request['checkfield']!=$check) ||
(empty($_SERVER['HTTP_USER_AGENT']))) die('Incorrect request') ; //stop spammers ?>

<?php include("connection.php");

$msg.="Name :\t$_POST[name]<br>";
$msg.="Telephone :\t$_POST[tel]<br>";
$msg.="Email :\t$_POST[email]<br>";

$subject= "Application Form" .$_POST['email'];
$headers.= "Reply-To: " .$_POST['email'];
$headers.="MIME-Version: 1.0\r\n";
$headers.="Content-type: text/html; charset=iso-8859-1\r\n";
$headers.="From:" .$_POST['email'];


Thanks every one for help..

Share this post

Link to post
Share on other sites
thanks for your reply,
previously i had a contact form on the same server.
that still works fine,
but now i have another for job application and with this i dont receive any emails.
i tried a test email with just 2 fields that also is not working..
any ideas!!!
thanks for the help..

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.