Rickzkm
29 Mar 2006, 10:05 AM
Hi, i have this script and i would need a copy to be sent to the visitors email $youremail
<?
require "emailtemplate.php";
function SendMail($for = "", $subject = "", $text = "", $email="")
{
// prekonvertovani do CZ podoby
$text = StrTr($text, "\x8A\x8D\x8E\x9A\x9D\x9E",
"\xA9\xAB\xAE\xB9\xBB\xBE");
$headers = "From: $email\nMIME-Version: 1.0\nContent-Type: text/html; charset=\"iso-8859-1\"\n";
$headers .= "Cc: \"".$youremail."\"\n";
$headers .= "X-Sender: <"; $headers .= $email; $headers .= ">\n";
$headers .= "X-Mailer: PHP\n"; // mailový klient
$headers .= "X-Priority: 1\n"; // Urgentní vzkaz!
$headers .= "Return-Path: <"; $headers .= $email; $headers .= ">\n"; // Návratová cesta pro chyby
if (!@Mail($for, $subject, $text, $headers)) {return false;}
return true;
}
if (SendMail("info@empire-elements.co.uk", "Order - Send from IP adress: $REMOTE_ADDR", $mailbody, "info@empire-elements.co.uk"))
echo "<br>Your order has been sent to MDFDesign.<br>";
else
echo "<br>Your order has not been sent to MDFDesign - transfer failed.<br>";
?>
<?
require "emailtemplate.php";
function SendMail($for = "", $subject = "", $text = "", $email="")
{
// prekonvertovani do CZ podoby
$text = StrTr($text, "\x8A\x8D\x8E\x9A\x9D\x9E",
"\xA9\xAB\xAE\xB9\xBB\xBE");
$headers = "From: $email\nMIME-Version: 1.0\nContent-Type: text/html; charset=\"iso-8859-1\"\n";
$headers .= "Cc: \"".$youremail."\"\n";
$headers .= "X-Sender: <"; $headers .= $email; $headers .= ">\n";
$headers .= "X-Mailer: PHP\n"; // mailový klient
$headers .= "X-Priority: 1\n"; // Urgentní vzkaz!
$headers .= "Return-Path: <"; $headers .= $email; $headers .= ">\n"; // Návratová cesta pro chyby
if (!@Mail($for, $subject, $text, $headers)) {return false;}
return true;
}
if (SendMail("info@empire-elements.co.uk", "Order - Send from IP adress: $REMOTE_ADDR", $mailbody, "info@empire-elements.co.uk"))
echo "<br>Your order has been sent to MDFDesign.<br>";
else
echo "<br>Your order has not been sent to MDFDesign - transfer failed.<br>";
?>