Email Verification when change email

This commit is contained in:
Ibnu Maksum
2024-08-19 14:21:21 +07:00
parent da985f27e1
commit 0d966a5e03
7 changed files with 314 additions and 130 deletions

View File

@ -96,7 +96,7 @@ class Message
public static function sendEmail($to, $subject, $body)
{
global $config, $PAGES_PATH, $_app_stage;
global $config, $PAGES_PATH, $debug_mail;
if (empty($body)) {
return "";
}
@ -116,7 +116,7 @@ class Message
} else {
$mail = new PHPMailer();
$mail->isSMTP();
if ($_app_stage == 'Dev') {
if (isset($debug_mail) && $debug_mail == 'Dev') {
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
}
$mail->Host = $config['smtp_host'];