include("archivos/head.php");
include("recaptcha/recaptchalib.php");
if (isset($_POST['nombre'])) {
$msg ="";
//$publickey = "6LfkvgoUAAAAACY9TCRjB_tYxf8SxLBEBmVg6pNj"; // you got this from the signup page
$privatekey = "6LfkvgoUAAAAABYa108R-XYkexW_AM_ifyDx87Pv";
$email_contenedor="tema@tema-sa.es";
//$email_contenedor = "paco@bfvinformatica.es";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
// Enviar e-mail a agritex
$email = $_POST['mail'];
$name = $_POST['nombre'];
$interesting = $_POST['comentario'];
$phone = $_POST['telefono'];
require("class.phpmailer.php");
$mail = new phpmailer();
$mail->IsMail(); // send via SMTP
$mail->Host = "mail.accesodirecto.es"; // SMTP servers
$mail->From = $email;
//$mail->FromName = $name." - ".$company;
$mail->FromName = $name;
$mail->AddAddress($email_contenedor);
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = "Contacto TEMA s.a.";
$mail->Body = "
====================================
CONTACTO
====================================
Nombre: ".$name."
Teléfono: ".$phone."
E-mail: ".$email."
Comentarios: ".$interesting."
====================================
FIN E-MAIL
====================================
";
$mail->Send();
// fin enviar e-mail to agritex
// Enviar e-mail al cliente
$mail = new phpmailer();
$mail->IsMail(); // send via SMTP
$mail->Host = "mail.accesodirecto.es"; // SMTP servers
$mail->From = $email_contenedor;
$mail->FromName = "tema@tema-sa.es";
$mail->AddAddress($email);
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = "Contacto";
$mail->Body = "
Hola ".$name.".
Esta es una copia de tu solicitud de contacto con
TEMA s.a.
En breve resolveremos tus dudas.
Gracias por contactarnos.
El equipo de TEMA S.A.
====================================
CONTACTO
====================================
Nombre: ".$name."
Teléfono: ".$phone."
E-mail: ".$email."
Comentarios: ".$interesting."
====================================
FIN E-MAIL
====================================
";
if(!$mail->Send())
{
$resultado="Lo sentimos mucho, servicio no disponible!
Su e-mail no ha podido ser enviado correctamente.
Contacte con nosotros en el e-mail
".$email_contenedor."";
} else {
$resultado="
Gracias por su interés.
Responderemos a su solicitud tan pronto nos sea posible.
El equipo de TEMA S.A.
";
}
// fin enviar e-mail to agritex
} // FIN DE ELSE, CAPTCHA ENVIA BIEN
} // end if
?>
include("archivos/left.php");?> | include("archivos/top.php");?> | |
![]() if (isset($_POST['nombre']) and isset($_POST['enviar'])){ ?>
|
||
include("archivos/pie.php"); ?> |