<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

define("MAIL_HOST", 'kangaroo.growsimple.io');
define("MAIL_USERNAME",'info@kangaroo.growsimple.io');
define("MAIL_PASSWORD",'s}7WKh-xBA,*');
define("ADMIN_EMAIL",'info@kangaroo.growsimple.io');
define("MAIL_ENCRYPTION", 'SSL');
define("MAIL_PORT", 465);


require "./vendor/autoload.php";
require 'vendor/phpmailer/phpmailer/src/Exception.php';
require 'vendor/phpmailer/phpmailer/src/PHPMailer.php';
require 'vendor/phpmailer/phpmailer/src/SMTP.php';
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\PHPMailer;




$name = "Name 11:56 Live";
$email = "Email";
$state = 'state';
$phone = 'phone';
$income = 'income';
$debt_amount = 'debt_amount';
$description = 'description';   

    

    $to = 'renukarani1994@gmail.com';
    $Name = 'Test';

    $mail = new PHPMailer();
                
               
                $mail->SMTPDebug = 0;                      //Enable verbose debug output
                $mail->isSMTP();                                            //Send using SMTP
                $mail->Host       = MAIL_HOST;                     //Set the SMTP server to send through
                $mail->SMTPAuth   = true;                                   //Enable SMTP authentication
                $mail->Username   = MAIL_USERNAME;                     //SMTP username
                $mail->Password   = MAIL_PASSWORD;                               //SMTP password
                $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;            //Enable implicit TLS encryption
                $mail->Port       = MAIL_PORT;
                $mail->setFrom('info@kangaroo.growsimple.io', 'Support Team');
                
                $mail->addReplyTo('info@kangaroo.growsimple.io', 'Support Team');
                
                $mail->addAddress($to, $Name);
                
                $mail->Subject = 'Form Submit';              

               
                $mail->Body = "Hi ,
                            <p>Name: $name ,</p>
                            <p>Email: $email ,</p>
                            <p>State: $state ,</p>
                            <p>Phone: $phone ,</p>
                            <p>Monthly Income: $income ,</p>
                            <p>Debt Amount: $debt_amount ,</p>
                            <p>Description: $description </p>
                            ";

                $mail->IsHTML(true);

                

   

                
                
                if ($mail->send()) {
    

                }



?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Thanks</title>
</head>
<body>
    <p>Thanks</p>
</body>
</html>