I would advise that you use a mail handling class, such as PEAR::Mail or phpmailer to help with emailing.
One other point -- the header() function expects the full URL to a location header. You are not guaranteed that it will work without the full URL:
Note: HTTP/1.1 requires an absolute URI as argument to Location: including the scheme, hostname and absolute path, but some clients accept relative URIs. You can usually use $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a relative one yourself.
I also agree that it should be able to run in safe mode. the easiest way to check is to change Apache configuration if you are using it as local server. I suppose that it should be sufficient to edit the conf file and restart the server.
Yeah but seriously it's not too complicated to generate a MIME email. Decoding on the otherhand is a different matter
I just came across a bizarre MIME message that I hadn't seen before
It's structure was
multipart/mixed -> (ok fine)
multipart/related -> (hmm not seen that before)
== plain text
Having problems getting the first set of attachments when there is a multipart/alternative in there
It's very common to see multipart/mixed with a sub-part of multipart/alternative, but to split that even futher and to mix up your attachments between parts... very strange. Never come across this structure before.... ever.