title: Determine if a email was sent successfully
body: <p>All,
  I have the standard mail code to send an email in PHP.</p>
  
  <pre><code>$to = $resultset['email_address'];
  $subject = "New client inquiry from Website.com";
  $message = $email_message;
  $from = $your_email;
  $headers = "From:" . $from;
  mail($to,$subject,$message,$headers,"-f $from");
  </code></pre>
  
  <p>The variables are created earlier in my code. However what I want to check is to make sure that the mail function was executed successfully. With this code, how can I determine if sent the email and if it didn't echo out "failure"?</p>