Das komische ist nur wenn ich dieses Script über ein Formular laufen lasse funktioniert es.Nur nicht wenn ich es über einen href Befehl starten möchte.
HTML Seite
<html>
<head>
<title>email</title>
</head>
<body>
<form method="POST" action="formmail.php4">
<p><input type="submit" value="speichern" name="B1"></p>
<input type="hidden" name="recipient" value="bindu75@web.de"><input type="hidden" name="subject" value="Ergebnisse">
</form>
<p><a href="formmail.php4" name="bindu75@web.de" value="bindu75@web.de">>test</a></p>
</body>
</html>
Das Script sieht so aus:
<?php
header("status: 204 No Content");
$fmtResponse= implode("", file("response.htt"));
$fmtMail= implode("", file("mail.txt"));
foreach($HTTP_POST_VARS as $key=> $val) {
$fmtResponse= str_replace("<$key>", $val, $fmtResponse);
$fmtMail= str_replace("<$key>", $val, $fmtMail);
}
mail($HTTP_POST_VARS["recipient"], $HTTP_POST_VARS["subject"], $fmtMail);
echo $fmtResponse;
?>