ashbullmanuk Posted October 31, 2009 Report Posted October 31, 2009 [ Contact Us ] Thank your email, it has been successfully sent. We shall soon receive it and will respond as soon as possible. If your query requires an urgent reply, or you already have a project underway with us, you can email directly to the relevent person: Concept Arts : conceptarts@kyu-images.com Web Concepts : webconcepts@kyu-images.com Photography : photography@kyu-images.com Enquiries : enquiries@kyu-images.com Or telephone : 01502 281284 between 09:00 - 18:00 Monday to Friday, and 10:00 - 15:00 Saturday. Please choose where to go next: [ Home ] [ About Us ] [ Web Design ] [ Logo Design ] [ Brand Imaging ] [ Photography ] Quote
falkencreative Posted October 31, 2009 Report Posted October 31, 2009 The script itself seems to be fine... at least, I'm not seeing any significant coding issues. As a start, perhaps try creating a new file with these contents (replace the email address), and uploading it to your server: mailtest.php: Open that up in your browser, and see if you still get the error. I'm just trying to check that the mail() function works correctly before debugging the script further. Quote
ashbullmanuk Posted October 31, 2009 Author Report Posted October 31, 2009 My host did that already and it worked fine - I wondered if it was an issue with the hosts server, but they seem to think the issue must come my side! Quote
ashbullmanuk Posted October 31, 2009 Author Report Posted October 31, 2009 Ok I found a script on the net that should send data from any form without knowing much about it, kind of a generic handler. I copied and uploaded, set the form action to follow it, and tested it. It returned a failed to send message. (the message is coded in the PHP for failure to send the message). So to it looks more likely an external problem????? The script I tried is: <?php if ($_SERVER['REQUEST_METHOD']=="POST"){ // In testing, if you get an Bad referer error // comment out or remove the next three lines if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 || !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])) die("Bad referer"); $msg="Values submitted by the user:\n"; foreach($_POST as $key => $val){ if (is_array($val)){ $msg.="Item: $key\n"; foreach($val as $v){ $v = stripslashes($v); $msg.=" $v\n"; } } else { $val = stripslashes($val); $msg.="$key: $val\n"; } } $recipient="enquiries@kyu-images.com"; $subject="General Web Enquiry"; error_reporting(0); if (mail($recipient, $subject, $msg)){ echo " Thank you Message successfully sent:\n"; echo nl2br($input); } else echo "An error occurred and the message could not be sent."; } else echo "Bad request method"; ?> Quote
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.