include("inc/.ht_config.inc.php");
if ($_POST[e] == 1) {
if (!$_POST[name] OR
invalidMail($_POST[email])) {
$error = 1;
}
if (!$error) {
// PREPARE EMAIL CONTENTS
$contents = "Datos ingresados por el visitante:
\n";
$contents .= "Nombre y Apellido: " . stripQuotes($_POST[name]) . "
\n";
if ($_POST[phone]) $contents .= "Teléfono: " . stripQuotes($_POST[phone]) . "
\n";
$contents .= "Email: " . $_POST[email] . "
\n";
if ($_POST[comments]) $contents .= "Comentarios:
\n" . nl2br(stripQuotes($_POST[comments])). "\n";
// OPENS TEMPLATE - USERS CONTENTS
$template = file(TEMPLATES_PATH . ".ht_mail");
reset($template);
foreach($template as $line){
$line = str_replace("{-SITE_URL-}", SITE_URL, $line);
$line = str_replace("{-CONTENTS-}", $contents, $line);
$final_template .= $line;
}
// HEADERS DEL MAIL Y ENVIO
$subject = "lacteoslaunion.com.ar - Formulario de contactos";
$headers = "From: " . stripQuotes($_POST[name]) . " <" . $_POST[email] . ">\n";
$headers .= "X-Sender: <" . $_POST[email] . ">\n";
$headers .= "X-Mailer: usap.org.ar\n";
$headers .= "X-Priority: 1\n";
$headers .= "Return-Path: <" . ADMIN_MAIL . ">\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
mail(ADMIN_MAIL, $subject, $final_template, $headers);
header("location: " . $_SERVER['PHP_SELF'] . "?sent=1");
exit;
}
}
//launion@schachenmayr.com.ar
?>
|
|||||||