title: PHP mail function works locally but not on the live site
body: <p>I am using the PHP mail function to send an email (I know I should be using a library like Swift but this is a legacy app).</p>
  
  <p>I have the following code - it definately works locally as I have installed the 'Test Mail Server Tool' to listen to all incoming emails on my localhost and it displays this as a pop-up, so I can be certain the current code does work from a code point of view.</p>
  
  <p>However for some reason on the live server the email never seems to get delivered to the email address - can anyone suggest the most common problems for this?
  Note - the email it is sending to on the live site belongs to a 'Google Apps' email address (not sure if this has any effect using Google).</p>
  
  <p>Code..</p>
  
  <pre><code>        $to = 'admin@mysite.com';
          $subject = 'Customer Comment';
          $message['headers'] =   'From: ' . $comment_data['contact-email'] . "\r\n";
          $message['headers'] .=  'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  
          $m =    'Message Sent From: ' . $comment_data['contact-name']   . '&lt;p /&gt;';
          $m .=   'Email Address: ' . $comment_data['contact-email']  . '&lt;p /&gt;';
          $m .=   'Message Comment: ' . $comment_data['contact-comment']  . '&lt;p /&gt;';
          $m .=   'Further Information Checkbox: ' . $site_info   . '&lt;p /&gt;';
          $m .=   'Third Parties Checkbox: ' . $third_party   . '&lt;p /&gt;';
  
  
          mail( $to, $subject, $m, $message['headers'] );
  </code></pre>