title: PHP mail() function does not work on web-host
body: <p>I'm having issues sending emails using the php mail() function. I know the php script I have works because I have an identical copy of it on another web-hosting company and it works there. </p>
  
  <p>I think it has to do with the web-hosting company itself. Do any of you know what I need to do in order to make it work? Is there something I need to tell them to install? I think they're running on Apache.</p>
  
  <p>Thanks,
  Amit</p>
  
  <p>For clarification purposes, here is the mail-script.</p>
  
  <pre><code>&lt;?php
  
  $to = 'my@email.com';
  $subject = 'Contact from your website';
  
  $message = 
  'Below are details from the Contact Us Form ' . "\n\n" . 
  'Name: ' . $_REQUEST['name'] . "\n\n" . 
  'Telephone Number: ' . $_REQUEST['phone'] . "\n\n" . 
  'E-mail address: ' . $_REQUEST['email'] . "\n\n" . 
  'Comments: ' . $_REQUEST['comments'];
  
  $email = $_REQUEST['email'];
  $headers = 'From: ' . $email . "\r\n" .
              'Reply-To: ' . $email . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
  $headers .= "MIME-Version: 1.0" . "\r\n";
  $headers .= "Content-type: text/plain; charset=ISO-8859-1";       
  
  //SPAM CHECK
  $str = $_REQUEST['spam'];
  $strE = $_REQUEST['email'];
  
  if( $str != "10" || $strE == "")
  {
      echo "&lt;div align='center' style='color:red'&gt;One or more of the form fields were incorrect, you will be redirected to the contact page within 3 seconds.&lt;/div&gt;";
  ?&gt;&lt;meta http-equiv="refresh" content="3;URL=http://engineercreativity.com/samples/biz/contact"&gt;&lt;!-- EDIT THIS --&gt;
  
  &lt;?php   
  } else {
      mail ($to, $subject, $message, $headers);
  ?&gt;
  &lt;meta http-equiv="refresh" content="0;URL=http://engineercreativity.com/thankyou.html"&gt; &lt;!-- EDIT THIS AS WELL --&gt;
  &lt;!--
  &lt;div class="text" align="center" style="text-align: center; color: green;"&gt;
  &lt;br/&gt;
  Thank you for contacting us!
  &lt;br/&gt;
  The message was succesfully sent!
  &lt;/div&gt;
  --&gt;
  &lt;?php
  } 
  ?&gt; 
  </code></pre>