$_PAGINA = 'WEB'; include_once ('includes/head.php'); include_once ('includes/menu.php'); include_once('includes/class.phpmailer.php'); $msg = ''; $done = false; if ($_POST["g-recaptcha-response"]) { $secret = '6Lcx4ikUAAAAAHZtCNGTILVZ8se82N9CptI-aWvy'; $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response=' . $_POST['g-recaptcha-response']); $responseData = json_decode($verifyResponse); if ($responseData -> success) { $nombre = $_POST['txtNombre']; $email = $_POST['txtEmail']; $telefono = $_POST['txtTelefono']; $comentarios= $_POST['txtMensaje']; if ($email != '') { $mail = new phpmailer(); $mail -> PluginDir = "./includes/"; $mail -> Mailer = "smtp"; $mail -> Host = "localhost"; $mail -> SMTPAuth = true; $mail -> Username = "web@netdata.com.uy"; $mail -> Password = "Netda123123+"; $mail -> From = "web@netdata.com.uy"; $mail -> FromName = "web@netdata.com.uy"; $mail -> Subject = "Netdata - Contact Form"; $mail -> IsHTML(True); $mail -> CharSet = 'UTF-8'; $mail -> AddAddress("martin.reboledo@netdata.com.uy"); $mail -> AddAddress("hello@netdata.com.uy"); $msgBody.='
| Nombre | '.strip_tags($nombre).' |
| '.strip_tags($email).' | |
| Subject | '.strip_tags($telefono).' |
| Comentarios | '.strip_tags($comentarios).' |