Not really no other than cURL which I don't think relies on that setting because it's an independant library.
Also try using file_get_contents() instead of fopen - it makes it a lot easier.
As for the email code, use PHPMailer instead. You won't need to worry about all the complex stuff you're doing.
My helpful sig has gone because a mod below the administrator gave me an infraction - despite the administrator personally agreeing to it.
If you need any php tips or tricks you can PM me.