" . $email . "

Hi " . $username . ",

We are team behined project GEESE. We would like to extend our gratitude for your joining to GEESE Surveys.

Although your account has already been setup. But we need to verify your account before you can use it.

This is just to validate your input credentials, and for security reasons and we research purposes.

Once you sign-up/sign-in for the first time you will directed to a page to activate your account by putting in a specific verify code generated from our website.

Your verification code is: {VERIFY_CODE}

"; require_once "PHPMailer/PHPMailer.php"; require_once "PHPMailer/SMTP.php"; require_once "PHPMailer/Exception.php"; $mail = new PHPMailer(); //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 = 'GEESE Verification Code'; // $subject $mail->Body = $body; if($mail->send()){ $status = "Success"; $response = "Email is Sent"; exit(json_encode(array("status" => $status, "response" => $response))); }else{ $status = "Failed!"; $response = "Email couldn't be sent: " . $mail->ErrorInfo; exit(json_encode(array("status" => $status, "response" => $response))); } } ?> // // function sendEmail($verifyCode){ // $username = $_SESSION['user']; // $email = $_SESSION['email']; // $body = " "; // require_once "PHPMailer/PHPMailer.php"; // require_once "PHPMailer/SMTP.php"; // require_once "PHPMailer/Exception.php"; // $name = "TEAM GEESE"; // $subject = "VERIFY GEESE ACCOUNT"; // $mail = new PHPMailer(); // //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 = "tanujjain140498"; // $mail->Port = 465; // $mail->SMTPSecure = "ssl"; // $mail->isHTML(true); // //This set the name which appears to the user who recieves the email // $mail->setFrom($email,$name); // //This cc the email to teamgeese2020@gmail.com // $mail->addAddress($email); // $mail->Subject = $subject; // $mail->Body = $body; // if($mail->send()){ // $status = "Success"; // $response = "Email is Sent"; // exit(json_encode(array("status" => $status, "response" => $response))); // }else{ // $status = "Failed!"; // $response = "Email couldn't be sent: " . $mail->ErrorInfo; // exit(json_encode(array("status" => $status, "response" => $response))); // } // }