title: PHP E-mail Feedback Form
body: <pre><code>&lt;?php
  $field_name = $_POST['cf_name'];
  $field_email = $_POST['cf_email'];
  $field_message = $_POST['cf_message'];
  
  $mail_to = 'someemail@eample.com';
  $subject = 'Feedback from '. $field_name
  
  $body_message = 'From: '.$field_name."\n";
  $body_message .= 'E-mail: '.$field_email."\n";
  $body_message .= 'Message: '.$field_message;
  
  $headers = 'From: '.$field_email."\r\n";
  $headers .= 'Reply-To: '.$field_email."\r\n";
  
  $mail_status = mail($mail_to, $subject, $body_message, $headers);
  
  if ($mail_status) { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Thank you for your feedback, have a nice day!');
          window.location = 'some undefined location';
      &lt;/script&gt;
  &lt;?php
  }
  else { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Sorry your feedback was not sent, please try again soon!');
          window.location = 'some undefined location';
      &lt;/script&gt;
  &lt;?php
  }
  </code></pre>
  
  <p>?></p>
  
  <p>I'm trying to create a form that submits the feedback to my desired email adress, the form seems to be running smoothly when i enter all the details but I am not receiving any emails?</p>
  
  <p>Can anyone see why?</p>
  
  <p>Thanks!</p>