<?php
//header('Content-type: application/json');
header('Location: contacto.html');
	$status = array(
		'type'=>'success',
		'message'=>'Gracias...! En breve nos pondremos en contacto con usted '
	);

    $name = @trim(stripslashes($_POST['nombre'])); 
    $correo = @trim(stripslashes($_POST['correo'])); 
    $telefono = @trim(stripslashes($_POST['telefono'])); 
    $mensaje = @trim(stripslashes($_POST['mensaje'])); 
    
   // $subject = @trim(stripslashes($_POST['asunto'])); 
    //$mensaje = @trim(stripslashes($_POST['mensaje'])); 

    $email_from = $correo;
$email_to = 'informes@modoviajes.nexellcorp.com';//replace with your correo

    $body = '******************************************'."\n" 
             . '         Solicitud de Informacion'."\n" 
             . '******************************************'."\n\n" 
             .'Nombre: ' . $name . "\n\n" 
             .'Correo: ' . $correo . "\n\n" 
             .'Telefono: ' . $telefono . "\n\n" 
             .'Mensaje: ' . $mensaje."\n"
             .'******************************************'."\n\n" ;

    $success = @mail($email_to, $subject, $body, 'From: <'.$email_from.'>');

    echo json_encode($status);
    die; 


/*
	header('Content-type: application/json');
	$status = array(
		'type'=>'success',
		'message'=>'Gracias...! En breve nos pondremos en contacto con usted '
	);

    $name = @trim(stripslashes($_POST['name'])); 
    $email = @trim(stripslashes($_POST['email'])); 
    $subject = @trim(stripslashes($_POST['subject'])); 
    $message = @trim(stripslashes($_POST['message'])); 

    $email_from = $email;
    $email_to = 'cotrinaramiro@gmail.com';//replace with your email

    $body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message;

    $success = @mail($email_to, $subject, $body, 'From: <'.$email_from.'>');

    echo json_encode($status);
    die;
    */
?>
