Well I just tried it on another site and your code works fine now.
With that last post what is your error message now?

We posted on top of each other.
Get rid of the first and last line:
<?php
?>

Those two lines are inserted by the software and should not be there
Also:
$body = "Test"
Missing the eof
should be like
$body = <<<EOF
"Test"


Blue Man Group
There is no such thing as stupid questions. Just stupid answers