I don't know if I really understand what would you like to do...I send the mail from an html page (using a form-redirecting on the php page) and the result(sent or failed) was displayed on a php page
<?
$toaddress="
[email protected]";
$subject = "Feedback from web site";
$mailcontent = "test";
$from = "
[email protected]";
mail($toaddress, $subject, $mailcontent, $from);
?>
<html>
<header>
<title>test</title>
</header>
<body>
<?
$mailsent = @mail($toaddress, $subject, $mailcontent, $from);
echo $mailsent ? "Mail sent" : "Mail failed";
?>
</body>
</html>
I hope this will help :)