MOON
Server: Apache
System: Linux smtp.modiva.org 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64
User: rtbrisc (1005)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/rtbrisc/public_html/admin/api/connect/mailer/index.php
<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Origin, Content-Type");

require_once "phpmailer/class.phpmailer.php";
define('SITE_URL', 'https://portal.qis-nigeria.com/');
//To Handle Session Variables on This Page
session_start();
$hashcode = $_GET['hash'];
$name = $_GET['name']; 
$email = $_GET['email'];
$userid = $_GET['id'];

	$message = '<html><head>
    <title>QIS | Confirmation Mail</title>
    </head>
	<body>';
    $message .= '<h2> Hi ' . $name .'!</h2><br>';
    $message .= '<h3>Thank you for signing up a QIS account. Please finish your sign up by clicking the link below:</h3><br>';
    $message .= "<a href=\"https://portal.qis-nigeria.com/verification/?id=$userid&email=$email&auth=$hashcode\">https://portal.qis-nigeria.com/verification/?id=$userid&email=$email&auth=$hashcode</a>" . "<br><br><br>";
	$message .= "This link is valid within 48 hours.<br>";
	$message .= "If you cannot click on the link, please copy it to your browser address bar and open the page.<br><br>";
	$message .= "Regards,<br>";
	$message .= "QIS Team.<br><br><br><br>";
	$message .= "Unfortunately, this email is an automated notification, which is unable to receive replies. We’re happy to help you with any questions or concerns you may have. Please contact us directly 24/7 via Support@qis-nigeria.com";
	$message .= "</body></html>"; 
    // php mailer code starts
    $mail = new PHPMailer(true);
    //$mail->IsSMTP(); // telling the class to use SMTP
    // $mail->SMTPDebug = 0;                     // enables SMTP debug information (for testing)
    // $mail->SMTPAuth = true;                  // enable SMTP authentication
    // $mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
    // $mail->Host = "smtp.gmail.com";      // sets GMAIL as the SMTP server
    // $mail->Port = 465;                   // set the SMTP port for the GMAIL server
    // $mail->Username = 'qisnigeria@gmail.com';
    // $mail->Password = 'Qis2018@';
    $mail->isSMTP();                            // Set mailer to use SMTP
    $mail->Host = 'smtp.gmail.com';             // Specify main and backup SMTP servers
    $mail->SMTPAuth = true;                     // Enable SMTP authentication
    $mail->Username = 'qisnigeria@gmail.com';          // SMTP username
    $mail->Password = 'Qis2018@'; // SMTP password
    $mail->SMTPSecure = 'tls';                  // Enable TLS encryption, `ssl` also accepted
    $mail->Port = 587;                          // TCP port to connect to

    $mail->SetFrom('no-reply@qis-nigeria.com', 'Quick IT Support');
    $mail->AddAddress($email);

    $mail->Subject = trim("Account Verification - Quick IT Support");
    $mail->MsgHTML($message);
	//$mail->send();

	if($mail->send()) {
		$message['status'] = "Your Registration was successful! Please visit you email (" . $email . ") for confirmation of your account.";
	}else{
		$message['status'] = $mail->ErrorInfo ;
		// header("Location: ../../register.php");
		//echo $mail->ErrorInfo;
	}

?>