Thanks for replying. It's a very straight and simple script:
I even tried to delete that line before the header, or put it after, but it didn't make a difference. And as I said, it works just like this on another host.
mail( "email@example.com", "Email Subject", "email body", "From: firstname.lastname@example.org" );
$handle = fopen("data.txt", "a");
foreach($_GET as $variable => $value)