Thomas R: mail () das will nicht mailen!!!

Beitrag lesen

Kann mir jemand sagen warum dieses Script nicht funktioniert:
-------------------------------------------
<?php
$message = "<html><head></head><body><h1> Hallo mein Test </h1></body></html>";
$to = " main@tester.de ";
$subject = " Testbetreff ";
$xtra = "From: tester@test.de \r \n";
$xtra .= " Content-Type: text/html \r \n Content-Transfer-Encoding: 8bit \r \n " ;
$xtra .= "Content-Type: text/plain; charset=iso-8859-1 \n" ;
$xtra .= "X-Mailer: PHP ".phpversion() ;
if (mail ($to, $subject,$message, $xtra)
{
echo "finished!";
}
else
{
echo ("nicht gesendet");
}

?>