Jump to content

AnthNE

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

AnthNE's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is totally annoying me now no idea what to do, Someone please help!! Im ready to tear my hair out
  2. Hello, I am having a huge problem with getting a contact php script to work on my FastHosts Windows 2003 server and they are not very helpful and hoped someone would be able to advise me what to do with my script to get it to work. Apparently the form looks like it works fine but i never receive the email into my mail box, fast Hosts have said its because they have some filter thing on to stop spam and i need to a code to my script like: $ini_set("sendmail_from", "email@mydomain.com"); Now i dont understand the exact reason why the emails are not getting through but I am under the impression it has to be with the SMTP server or something and i need the code above and for the mails to show they are from my own domain if that makes sense, trouble is i have no idea what to change or anything as it was a script i got off net. Can anyone help me please, I have tried for hours to get it to work and i cant when i add the $ini code i get an error on the script when i click send says error on line 4 etc, a copy of the script i am using is below if anyone could sort this i would be very grateful as Fast Hosts are useless and simply tell me 'im sorry we can not supply support on php' why they cant supply a script is beyond me especially considering im not the only one having this problem!! <? $mailto = 'email@mydomain' ; $subject = "Query From Contact Form" ; $formurl = "http://www.mydomain.com/contact_form.htm" ; $errorurl = "http://www.mydomain.com/contact_form_error.htm" ; $thankyouurl = "http://www.mydomain.com/contact_form_thanks.htm" ; $uself = 1; // -------------------- DO NOT CONFIGURE BELOW --------------- $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ; $name = $_POST['name'] ; $email = $_POST['email'] ; $comments = $_POST['comments'] ; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; } if (empty($name) || empty($email) || empty($comments)) { header( "Location: $errorurl" ); exit ; } if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) { header( "Location: $errorurl" ); exit ; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name of sender: $name\n" . "Email of sender: $email\n" . "------------------------- COMMENTS -------------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n" ; mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit ; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.