How to verify each email sent by php mailer?
<p>I'm in a situation that I need to verify the sending of the emails submitted by a form. I want to show in the page (it's a test) if the email was sent.</p>

<p>Example: </p>

<pre><code>if(!$email){
    echo "email not sent";
} else {
    echo "email sent";
}
</code></pre>

<p>This is the part of my code that I use to send emails:</p>

<p>page.php</p>

<pre><code>$subject = "Hello!";
$html = "&lt;p&gt;Message&lt;/p&gt;";

$mail = new PHPMailer();

$mail-&gt;SetFrom('example1@email.com', 'One');

$address = "example1@email.com";
$address2 = "example2@gmail.com";

$mail-&gt;AddAddress($address, "receiver1");
$mail-&gt;AddAddress($address2, "receiver2"); 

$mail-&gt;Subject = $subject;

$mail-&gt;MsgHTML($html);

// I need to verify each email here 
</code></pre>