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( "firstname.lastname@example.org", "Email Subject", "email body", "From: email@example.com" );
$handle = fopen("data.txt", "a");
foreach($_GET as $variable => $value)