Verifying that an email was sent successfully

I am creating a “Contact us” page with a form.
Upon submission, a PHP script will send two emails:
The first email is the support message, which is sent to us;
the second is a confirmation email to the user.

How could I program a PHP script to send these emails and verify that the emails were sent successfully?

It is very important that the customer is notified if their message does not go through successfully.

Well, the mail function returns true upon sending and false upon failure, so you could just throw it in an if statement like so:

if ( mail( $to, $subject, $msg, $addheader ) ) {
     $content .= "<h1 class=\\"home\\">Feedback recieved.</h1>";
} else {
     $content .= "<p class=\\"error\\">Message Failed to send!</p>";
}