The if doesn't check if the mails are sent or not, it only checks if it was queued to the mail program. The only time it will ever return false is if there is an issue contacting the smtp.
Not sure exactly what you are looking for either. As soon as mail() is called as a function it executes at this point. You capture the results into the variable (optional) and use an if to see if it was queued. If you are looking to capture the signature definition, you can do it either as a callable type:
And the other option is via ReflectionFunction and calling the ->invoke method.
$fpFunc = 'mail';
$fpFunc('email@example.com', 'subject', 'body', ...);
call_use_func($fpFunc, 'to', 'subject', 'body', ...);
// can be checked:
$fpFunc('to', 'subject', 'body');
If its just a matter of checking the results for each, then you can use an array to capture the results. The only thing to note is that this result does not indicate if a user received an email, as that cannot be detected in PHP.