Hi, first time using PHP or setting up a form for my nephew's Xtreme-generated website using Not2sure's script at http://www.kirupa.com/web/form_mailer.htm (although I'm an old ex-mainframe techy who'll have a go at any piece of code I see!)

He reports mails not being consistently sent to his email address. We're using the location header to present a 'thank you' page after hitting submit on the form. He thinks mails are not being sent if the 'thank you' page is closed rather than the user then going to another page on the site.

Only thing I can think off is that the script is being aborted by the action of closing the page rather than exiting cleanly after the page is navigated away from. However, the mail action is requested before redirection to the thank-you page. Is the mail call an async process and therefore perhaps I should test/wait for its success as I've noticed on other scripts here? Or is it a problem with the hosting site's PHP? Or a quirk of Xtreme's generated HTML?

The form's at http://www.kineticfox.com/bookingenquiry.htm (BTW, we know the site needs a bit of tidying up but it was his first attempt and you know how youngsters rush at things!)

Thanks