How to check mail send success or not when using mail() PHP?
<p>How to check mail send success or not when using mail() PHP ?</p>

<p>I use this code for send mail to user , But i want to know how can i check send mail status success or not on this code ?</p>

<pre><code>&lt;?PHP
include("connect.php");
$to      = "test@example.com";
$subject = "Subject";
$message = "Message";
$headers  = 'MIME-Version: 1.0' . "\r\n"; 
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: EXMAPLE &lt;noreply@example.com&gt;' . "\r\n";
$headers .= 'Return-Path: return@example.com' . "\r\n";
mail($to, $subject, $message, $headers, '-freturn@example.com');
?&gt;
</code></pre>