php iis and html issues

These are photos of my settings, i need the dots joining up, i feel there is a link of something missing, i can send mail when i double click this this script pic 1, but when I click the submit button on the site it wont run, the php thats running on my server is verson 5.5 and this is a photo of the php ini located in my programs files directory pic2, I have a php script also that the contact section of my html page refers to pic3 , hope this helps understand my issue, I ve no configured iis manager smtp server and it works when i run the script as mentioned but not when i click the submit on the contact form.

This is the line of text in my contact html page that refers to the mail.php file


Without seeing the full files (form included) it’s really hard for us to help. You’re not really giving us a proper description of your problem. Are you getting any error messages for example? Have you checked the PHP error log? Windows events (if it’s a 500 error).

Looking at your ini file, it looks correct. Mine is set to localhost port 25 running PHP 5.5.8 on IIS 7.5.

hi

I attached a photo of all the settings in my first post.

I ve now solved the issue, but came accross another, Any E-Mail that is sent from my website into my gmail account auto go’s into spam, is there anything i need to add in my php file to stop this, Iam no programmer so bear with me on it.

That’s the main problem using PHP mail, it’s quite difficult to configure it to not go into the junk box. The script I’m using at the moment usually always hits the inbox but it’s unpredictable. That’s why most websites will ask you to check your junk folder. All you can do is either use a plugin or make sure that you have all the headers set correctly and the reply-to.

ahh ok

these are the only headers i have in the php script:

<?php $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $from = "my domain name external address"; $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $formcontent=" From: $name \n Message: $message \n email: $email"; $recipient = "my email address"; $subject = "Contact Form"; $mailheader = "From: $email \r\n"; header('Location: index.html#thankyou'); mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); ?>

please feel free to correct me on anything within my script

Here is what I use:

[PHP]
$to = $_POST[‘email’];
$subject = $_POST[‘subject’];
$from = $_POST[‘email’];
$message = $_POST[‘message’];

      $headers  = 'MIME-Version: 1.0' . "\r\n";
      $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

        $headers .= "Reply-To: Some One <$youremail>\r\n"; 
        $headers .= "Return-Path: Some One <$youremail>\r\n"; 
        $headers .= "Organization: Some Company Ltd\r\n"; 
        

      // Additional headers
      $headers .= 'To: <'.$_POST['email'].'>' . "\r\n";
      $headers .= 'From: Your Site <$youremail>' . "\r\n";

      // Mail it
      if (mail($to, $subject, $message, $headers)){
          //Success
          successMsg("Thank you for your email");
      }else {
                  //Error
                  errorMsg("There was a problem sending your mail, please try again.");
     }

[/PHP]

your script dont work for me, i just tryed it, ummm.

You will need to edit it and put your own variables in.

yes i did that, i need it to go load the thank you page and its not doing that

Gmail filters what goes into the inbox and spam folders, a lot of it has to do with email authentication…

Send an email to [email protected] and it will auto respond with a full report…

hi

thanks i will give that a go.

Sponsor our Newsletter | Privacy Policy | Terms of Service