Can you use an IF statement on an object?
<p>My apologies if I misstate something or use an incorrect term.  But I was trying to figure out how to use an if statement on an object.</p>

<p>This works just fine and as I understand it, the @ suppresses errors.</p>

<pre><code>if (@mail("$receiver_email", "$subject", "$message", "$headers")) { }
</code></pre>

<p>However If I do this it fails:</p>

<pre><code>if (@$mail-&gt;send('email@gmail.com', "$receiver_email", "$subject", "$message")) {}
</code></pre>

<p>The irony is that the email goes through but the IF fails.  How can I fix the IF statement so it works properly?     </p>
