Jump to content

Recommended Posts

Posted

Hi y'all!

 

My customer has recently experienced trouble with his response form (As discussed earlier under

Business..) He had similar troubles a while back which was eventually resolved, but now it is back! The form itself and the php script were NOT generated by me, and I am not smart enough to analyze them by myself!

 

The form is HERE and the current script is shown below.

 

Any new insights?

 

Thanks! Alfie

 

<?php

$to = "chmyrockin@blueridge.net" ;

$from = $_REQUEST['email'] ;

$name = $_REQUEST['name'] ;

$headers = "From: $from";

$subject = "Information About Chimney Rock Inn";

 

$fields = array();

$fields{"name"} = "name";

$fields{"phone"} = "phone";

$fields{"email"} = "email";

$fields{"arrival"} = "arrival";

$fields{"DateLeaving"} = "DateLeaving";

$fields{"roomtype"} = "roomtype";

$fields{"adults"} = "adults";

$fields{"children"} = "children";

$fields{"homenumber"} = "homenumber";

$fields{"cottagetype"} = "cottagetype";

$fields{"comments"} = "comments";

 

 

$body = "We have received the following information:\n\n"; foreach($fields as $a => $B){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

 

$headers2 = "From: chmyrockin@blueridge.net";

$subject2 = "Thank you for contacting us";

$autoreply = "Thank you for contacting us.

You will be receiving more information shortly from us.";

 

if($from == '') {print "You have not entered an email, please go back and try again";}

else {

if($name == '') {print "You have not entered a name, please go back and try again";}

else {

$send = mail($to, $subject, $body, $headers);

$send2 = mail($from, $subject2, $autoreply, $headers2);

if($send)

{print "Thank You for contacting Us! You will be contacted soon about your request" ;}

else

{print "We encountered an error sending your mail, please notify chmyrockin@blueridge.net"; }

}

}

?>

Posted

Never mind folks! Turns out to be his server blocking his e-mails!!! I have never experienced such a screw-up in my life.

 

We still do not know who is actually hosting his site. I guess we will have to wait to see who bills him!

 

Happy holidays to all!

 

Alfie

Posted

Never mind folks! Turns out to be his server blocking his e-mails!!! I have never experienced such a screw-up in my life.

 

We still do not know who is actually hosting his site. I guess we will have to wait to see who bills him!

 

Happy holidays to all!

 

Alfie

 

In the mean time you can install a 3rd party SMTP mailer such as PHPmailer or Swiftmailer. They're not the easiest programs to use and incorporate. However, once installed and configured correctly you never have to worry about googles smtp servers going offline.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...