HTML
Ich habe nach dem Wechsel von Manitu zu netcup Webhosting 2000 ein Problem mit folgendem Script, das eine Bestellung als Mail an mich senden sollte (im Code unten anonymous@gmx.de): Der mail-Befehl funktioniert nicht, er gibt false zurück. Idee?
---
[...]
$body = base64_encode(
"TOTAL=" . $total . "\r\n" .
"SURCHARGE=" . $surcharge . "\r\n" .
"PP=" . $pp . "\r\n" .
"PRICE=" . $price . "\r\n" .
"ADDRESS:\r\n" . $address . "\r\n"
);
$boundary = "UHzpMtjpjtMvdtEJVP4nfCjHyWW6WJgs";
$header =
"From: mail@meine-netcup-domain.com\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: multipart/alternative;boundary=\"" . $boundary . "\"\r\n" . "--" . $boundary . "\r\n" .
"Content-Type: text/plain; charset=UTF-8\r\n".
"Content-Transfer-Encoding: base64\r\n";
if (mail("anonymous@gmx.de)", "ORDER", $body, $header))
{
$template = file_get_contents("report_template.html");
if ($template)
{
if ($pp < 0)
$price_fmt = sprintf("%2d.%02d", -floor(abs($price) / 100), abs($price) % 100) . "€";
else
$price_fmt = sprintf("%2d.%02d", floor(abs($price) / 100), abs($price) % 100) . "€";
$template = str_replace("@PR_FORMATTED", $price_fmt, $template);
// deliver page
echo $template;
}
else
{
header("Location: http://www.meinedomain.com/division/circuits/onlineshop/php-error.html");
}
}
else
{
echo "<html>";
echo "<head>";
echo "<title>Error</title>";
echo "</head>";
echo "<body>";
echo "<p><strong>Error 404 - Mail error (your order was NOT received!)</strong></p>";
echo "<p>Possible reasons:";
echo "<ul>";
echo " <li>Server configuration error.</li>";
echo "</ul>";
echo "</body>";
echo "</html>";
}
[...]
Alles anzeigen