Contacto
check($_POST['captcha_code']) == false) {
// the code was incorrect
$field_error['captcha_code'] = true;
// handle the error accordingly with your other error checking
$print_again = true;
// or you can do something really basic like this
//die('The code you entered was incorrect. Go back and try again.');
}
if($print_again) {
echo "
Su mensaje no pudo ser enviado
Por favor, verifique los campos obligatorios marcados en rojo
";
show_form();
} else {
include_once("../_sys-includes/site-mail-contact-html.php");
include_once("../_sys-includes/site-mail-contact-txt.php");
require("../_sys-assets/plugins/phpmailer-5.1/class.phpmailer.php");
$mail = new PHPMailer();
//$mail->IsSMTP(); // telling the class to use SMTP
//$mail->SMTPDebug = 1; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = false; // enable SMTP authentication
$mail->Host = $cfg_smtp["host"]; // sets the SMTP server
$mail->Port = $cfg_smtp["port"]; // set the SMTP port for the GMAIL server
$mail->Username = $cfg_smtp["user"]; // SMTP account username
$mail->Password = $cfg_smtp["pass"]; // SMTP account password
$mail->IsHTML(true); // telling the class is HTML
$mail->SetLanguage( $lang, '../_sys-assets/plugins/phpmailer-5.1/language/' );
$mail->From = $_POST["personal_email"];
$mail->FromName = $_POST["personal_name"];
$mail->AddAddress($cfg_frommail);
$mail->Subject = "Sistema de Contacto ".$sys_client_cia."";
// Contenido html
$mail->Body = $mail_content_html;
// Contenido texto
$mail->AltBody = $mail_content_txt;
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo "
";
echo "
".$mail->ErrorInfo."
";
} else {
echo "
Su mensaje ha sido enviado
Gracias por su tiempo. Atenderemos a su mensaje a la brevedad posible.
";
}
}
}
?>
=$site_footer;?>