<?php
include "phpmailer/class.phpmailer.php";
include "phpmailer/class.smtp.php";

        $name    = 'Armando';      
        $email   = 'Correo';
        $msg     = 'Prueba';

        // send email
        $mail = new PHPMailer();
        $mail->isSMTP();     
        $mail->isHTML(false);       
        $mail->Host = 'email-smtp.us-east-1.amazonaws.com';  // Or put your zone here
        $mail->Port = 587;
        $mail->SMTPAuth = true;        
        $mail->SMTPSecure = "tls";          
        $mail->Username = 'AKIATDZTTWFOORJK72OW';                          
        $mail->Password = 'CsSMVLcMgp/qz3WF2OXUmaFbogbqIlSB/WLklQIx';  

        $mail->setFrom('indeval@grupobmv.com.mx', "$name");
        $mail->addAddress('arjimo93@gmail.com');    

        $mail->Subject = "Prueba";
        $mail->Body    = "Nombre: $name \n" .
                         "Email: $email \n" .
                         "Mensaje: $msg \n";

        if(!$mail->send()) {
            echo "Error: " . $mail->ErrorInfo;
            echo json_encode(array("status" => 404));
        } else {
            
            echo json_encode(array("status" => 200));
            exit;
    } 
?>