pureform Posted February 11, 2011 Report Share Posted February 11, 2011 Let me start by professing my admitted lack of .php prowess. Ok, that out of the way: I have a contact form that I "fixed" for someone a few years ago that has been working fine since but apparently about a week ago is has begun to fail. It sends emails fine from some users, but not at all from others, in both cases forwarding to success page. Any ideas? On a shared Godaddy server and using jacks formmail.php, but like I said, worked fine until a few weeks ago. Any ideas where to trouble shoot first? Thanks in advance. EDIT:Problem solved. Solution: Do not rely upon your client to properly explain any web related problems. Thanks for all the replies:) Quote Link to comment Share on other sites More sharing options...
pureform Posted March 4, 2011 Author Report Share Posted March 4, 2011 Nope, I was wrong the problem persists. (though the not relying upon clients part is still valid) I threw out the script I was using and am processing it with a script I pieced together using Matt Varone's sendmail. Same problem remains: certain emails do not get sent even though the form redirects to the thanks page. If anyone has any ideas, stories, anything, I'm out of options. Here's the script: <?php # ------------------------------------------------------------ // PHP CONTACT FORM SCRIPT v1.0 // By Matt Varone | http://www.mattvarone.com # ------------------------------------------------------------ # ------------------------------------------------------------ // General Configuration # ------------------------------------------------------------ // Name of the website. $szFrom = "Orlando Villa Rentals- Owners"; // Your email, (the recipient email address). $szRecipient = "nick@xxxxx.com, mick@xxxxxxxx.com"; // Website email address ( Sender's email address ). $szFromEmail = "donotreply@xxxxx.com"; /* Title comes from a hidden input in the form. This gives the possibility to set up more than one form and use this same script.*/ $szTitle = $_POST['title']; // This sets up the email subject. $szSubject = $szFrom.": ".$szTitle; /* All input fields coming from the form/s should go here. The first value is the name attribute used and the second value on the right the name wanted to display on the final email.*/ $aPosted = array( "realname" => "Name", "floridahome" => "Florida Home", "email" => "Email Address", "headname" => "Head of Party", "adults" => "Adults", "children" => "Children", "from" => "From Date", "to" => "To Date", "cot" => "Cot Hire", "flightdetails" => "Fight Details", "other" => "Comments and Special Requests", // add here your fields ); # ------------------------------------------------------------ // Email Content # ------------------------------------------------------------ $szEmailContent.= $szSubject."\n"; $szEmailContent.= "------------------------------------------------------------\n\n"; $szLast = ""; foreach($aPosted as $value => $szReal) { if(isset($_POST[$value])) { if($szLast != $szReal) { $szEmailContent.= $szReal.":"; $szLast = $szReal; }; $szEmailContent.= " ".$_POST[$value]."\n\n"; }; }; # ------------------------------------------------------------ // Declare Email headers # ------------------------------------------------------------ $szHeaders = 'From: ' . $szFromEmail . "\r\n" . 'Reply-To: ' . $szFromEmail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); # ------------------------------------------------------------ // Output # ------------------------------------------------------------ if( mail( $szRecipient, $szSubject, $szEmailContent, $szHeaders, '-f' . $szFromEmail ) ) // go to previous page ($lasturl) with message=1 (should be a succes message). header( 'Location: http://' . $_SERVER['HTTP_HOST'] . html_entity_decode( $_POST['lasturl'] ) . '/owners/thanks.htm' ); else // go to previous page ($lasturl) with message=2 (should be a failure message). header( 'Location: http://' . $_SERVER['HTTP_HOST'] . html_entity_decode( $_POST['lasturl'] ) . '/owners/error.htm' ); ?> Quote Link to comment Share on other sites More sharing options...
Wickham Posted March 5, 2011 Report Share Posted March 5, 2011 There have been lots of comments that forms don't work on GoDaddy. They want you to use their own form mailer. Have a look at http://help.godaddy.com/article/512 (ASP - Windows hosting and webformmailer.asp) http://help.godaddy.com/article/510 (PHP - Linux and webformmailer.php) http://help.godaddy.com/article/3043 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.