<?php
	use PHPMailer\PHPMailer\PHPMailer;
	    
	    $name = "(no-reply) Team GEESE";
	    $email = $email;
	    $subject = 'GEESE Verification Code';
	    // $body = $_REQUEST['body'];	    
	    
	    $body = "
	        <html> 
	            <body style='color: #000; font-size: 16px; text-decoration: none; font-family:  Helvetica, Arial, sans-serif; background-color: #efefef;'>
	                
	                <div id='wrapper' style='max-width: 800px; margin: auto auto; padding: 20px;'>
	                    
	                    <div id='logo'>
	                        <center><h1><a href='https://ps2020.cdms.westernsydney.edu.au/".dir_root."images/logov1.png' target='_blank'><img style='max-height: 75px;' src='https://ps2020.cdms.westernsydney.edu.au/".dir_root."images/logov1.png'></a></h1></center>
	                    </div>
	                        
	                    <div id='content' style='font-size: 16px; padding: 50px; background-color: white; box-shadow: 0 0 15px #548b54;
	                        moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; -khtml-border-radius: 10px;
	                        '>
	        
	                        " . $content . "
	                        
	        
	                        <!-- <p style='display: flex; justify-content: center; margin-top: 10px;'>
	                            <center>
	                                <a href='{CUSTOM_URL}' target='_blank' style='border: 1px solid #0561B3; background-color: #548b54; color: #fff; text-decoration: none; font-size: 18px; padding: 10px 20px;'>Activate Account</a>
	                            </center>
	                        </p> -->
	                        
	                    </div>

	                </div>
	            </body>
	        </html>";



	    require_once dir_rootPHP."php/request/PHPMailer/PHPMailer.php";
	    require_once dir_rootPHP."php/request/PHPMailer/SMTP.php";
	    require_once dir_rootPHP."php/request/PHPMailer/Exception.php";

	    $mail = new PHPMailer();
	    
	    // include_once "PHPMailer/connect_smtp.php";

	    //smtp settings
		$mail->isSMTP();
		$mail->Host = "smtp.gmail.com";
		$mail->SMTPAuth = true;
		$mail->Username = "teamgesse2020@gmail.com";
		//Enter your password and replace you gmail above with mine
		$mail->Password = "teamgeese1234";
		$mail->Port = 465;
		$mail->SMTPSecure = "ssl";

	    //Email Settings
	    $mail->isHTML(true);
	    $mail->setFrom($email,$name);
	    $mail->addAddress($email);
	    $mail->Subject = $subject;
	    $mail->Body = $body;

	  //   if($mail->send()){
	  //       // Logged-in
			// session_start();
			// $_SESSION['userID'] = $id;
			// $_SESSION['user'] = $username;
			// $_SESSION['email'] = $email;
			// $_SESSION['accountType'] = $accountType;
			
			// $output['success'] = true;
			// $output['session'] = array("user" => $_SESSION['user'], "accountType" => $_SESSION['accountType']);

			// // header('location: '.dirname(__FILE__).'./../logged.php');
			// header('location: '.dir_root.'verify-email.php');
	  //   }else{
	  //       // Logged-in
			// session_start();
			// $_SESSION['userID'] = $id;
			// $_SESSION['user'] = $username;
			// $_SESSION['email'] = $email;
			// $_SESSION['accountType'] = $accountType;
			
			// $output['success'] = true;
			// $output['session'] = array("user" => $_SESSION['user'], "accountType" => $_SESSION['accountType']);

			// // header('location: '.dirname(__FILE__).'./../logged.php');
			// header('location: '.dir_root.'verify-email.php');
	  //   }
?>