>>Hmm doesn't seem to work, even with the fake addresses in the $header.
Silly as this sounds, have you got error reporting on in the script, as this may tell you what's happening, for example, if the smtp settings are set and are pointing to a valid server.
When I am developing any script that uses mail() I always test it on my localhost that I know doesn't have any smtp settings done, and when I invoke the mail function (with error reporting on) I get an error saying that the function couldn't access valid smtp settings - thus proving that the mail() function is at least up until that point functioning and referencing external files as it needs to.
I have a feeling that this is down to something in your php.ini file on the server that your working on, check that it has a valid server port and return address.
This is from my own php.ini file, and should give you an idea of what your looking for:-
[mail function]
; For Win32 only.
; h t t p://php.net/smtp
SMTP = localhost
; h t t p://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; h t t p://php.net/sendmail-from
sendmail_from = pp@yourdomain
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; h t t p://php.net/sendmail-path
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
Check over your parameters and ensure as they are correct, if they are, then the problem lies somewhere else, but from what has been posted by
SevenCubed that should act as an excellent tester, then when your monitoring your email inbox, check the spam filter, as they often end up in there.
But honestly, having error_reporting(E_ALL|E_STRICT); turned on and used on your script, this shall inform you if there are any server issues.
Hope this helps a little.
Cheers,
MRb