Hi there I have been using this PHP code for some time now, and started to find something fishy when I notice that I stop receiving emails from my form. So I did test, filled out my form and realized that none of the forms has gone to my email addys. I only asked for your help, so I can find out if my PHP code is in error which has been a success for a few years now, or the actual server with the hosting company that I am with?? Here is my code: <?php /* start email */ $contents = "WEBSITE BRIEF STATEMENT" ."<br>----------------------------" ."<br>PROJECT" ."<br>----------------------------" ."<br>Project = ".$_POST['project'] ."<br>----------------------------" ."<br>PERSONAL DETAILS" ."<br>----------------------------" ."<br>Name = ".$_POST['First'] ."<br>Last = ".$_POST['Last'] ."<br>Phone = ".$_POST['Phone'] ."<br>Email = " .$_POST['Email'] ."<br>----------------------------" $subject = "Title"; $from = "Website Enquiry Form"; $cont = True; $to = "email@address.com"; $from_header = "From: $from \r\n"; $from_header .= "Content-type: text/html; charset=iso-8859-1\r\n"; if ($cont): mail($to, $subject, $contents, $from_header); endif; ?> If there is an error, than I know it would execute online, so I hoping its the server. Many thanks in advance CHEERS
Hi there I have been using this PHP code for some time now, and started to find something fishy when I notice that I stop receiving emails from my form. So I did test, filled out my form and realized that none of the forms has gone to my email addys. I only asked for your help, so I can find out if my PHP code is in error which has been a success for a few years now, or the actual server with the hosting company that I am with?? Here is my code: <?php /* start email */ $contents = "WEBSITE BRIEF STATEMENT" ."<br>----------------------------" ."<br>PROJECT" ."<br>----------------------------" ."<br>Project = ".$_POST['project'] ."<br>----------------------------" ."<br>PERSONAL DETAILS" ."<br>----------------------------" ."<br>Name = ".$_POST['First'] ."<br>Last = ".$_POST['Last'] ."<br>Phone = ".$_POST['Phone'] ."<br>Email = " .$_POST['Email'] ."<br>----------------------------" $subject = "Title"; $from = "Website Enquiry Form"; $cont = True; $to = "email@address.com"; $from_header = "From: $from \r\n"; $from_header .= "Content-type: text/html; charset=iso-8859-1\r\n"; if ($cont): mail($to, $subject, $contents, $from_header); endif; ?> Code (markup): If there is an error, then I know it would not execute online, so I'm hoping its the server. Many thanks in advance CHEERS
yep... the code looks ok... i would change: if ($cont): mail($to, $subject, $contents, $from_header); endif; to: if ($cont){ mail($to, $subject, $contents, $from_header); }
Hey guys Thanks for replying, I found out that it was the hosting provider's mail server as 'ebookbusiness' mentioned. Sweet then, so I just remove the endif; Thanks sloddl, I'll do that and go from there. CHEERS