Hallo Forum,
ich habe das Problem, dass mein Kontaktformular nicht versendet wird.
Gehostet ist die Seite bei Hosteurope und PHP ist aktiv.
Das dazugehörige Script sieht so aus:
---------------------------------------------------
<?php
$mailto="mail@mail.de";
$mailfrom="mail@mail.de";
$subject="Kontaktformular:" . $_SERVER['HTTP_HOST'] . " (es wurde kein Subjekt angeben)";
$str_logtext = "Rechner: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) . " (" . date("H:i - d.m.Y") . ")";
if (isset($_POST["recipient"])) $mailto=$_POST["recipient"];
if (isset($_POST["subject"])) $subject=$_POST["subject"];
if (isset($_POST["E-Mail"])) $mailfrom=$_POST["E-Mail"];
$fmtResponse= implode("", file("weg.htm"));
$fmtResponseError= implode("", file("nichtweg.htm"));
$fmtMail= implode("", file("mailtext.txt"));
$fmtMail= str_replace("<loginfo>", $str_logtext, $fmtMail);
foreach($_POST as $key=> $val) {
$fmtResponse= str_replace("<$key>", $val, $fmtResponse);
$fmtResponseError= str_replace("<$key>", $val, $fmtResponseError);
$fmtMail= str_replace("<$key>", $val, $fmtMail);
}
$from="From: ";
$from= $from . $mailfrom;
if ( mail($mailto, $subject, $fmtMail, "$from") ) {
echo $fmtResponse;
}
else {
echo $fmtResponseError;
}
?>
-------------------------------------------
Kann mir jemand weiterhelfen???
Vielen Dank!