spramod Posted June 13, 2006 Share Posted June 13, 2006 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 '[email protected]', but on another server, where the email address is '[email protected]', 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:<?php$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>"; $to="[email protected]"; $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']; mail($to,$subject,$msg,$headers);?>Thanks every one for help.. Link to comment https://forums.phpfreaks.com/topic/11876-php-form-email/ Share on other sites More sharing options...
swatisonee Posted June 14, 2006 Share Posted June 14, 2006 Could the other server have blocked emails from form addresses ? Link to comment https://forums.phpfreaks.com/topic/11876-php-form-email/#findComment-45607 Share on other sites More sharing options...
spramod Posted June 15, 2006 Author Share Posted June 15, 2006 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.. Link to comment https://forums.phpfreaks.com/topic/11876-php-form-email/#findComment-45815 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.