From 653bd79d0c2c08766104fce7eedfd92101b011cc Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Fri, 11 Apr 2025 09:29:51 +0200 Subject: [PATCH] Update SMTP configuration: switch to Office 365 for email sending and adjust OAuth scopes --- php/process_ticket.php | 8 ++++---- phpmailer/get_oauth_token.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/php/process_ticket.php b/php/process_ticket.php index c9c4753..875b474 100644 --- a/php/process_ticket.php +++ b/php/process_ticket.php @@ -107,14 +107,14 @@ $mail = new PHPMailer(true); try { $mail->isSMTP(); - $mail->Host = 'smtp.gmail.com'; + $mail->Host = 'smtp.office365.com'; $mail->SMTPAuth = true; - $mail->Username = 'ticketsopdracht@gmail.com'; - $mail->Password = 'rqxm fbju xbmu qmbr'; + $mail->Username = 'ticketsopdracht@outlook.com'; + $mail->Password = 'ZZ^HyL*vyveJEZ04u&1W'; // Replace with the actual password or app-specific password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587; - $mail->setFrom('ticketsopdracht@gmail.com', 'Spik & Span'); + $mail->setFrom('ticketsopdracht@outlook.com', 'Spik & Span'); $mail->addAddress($email, $name); $mail->isHTML(true); diff --git a/phpmailer/get_oauth_token.php b/phpmailer/get_oauth_token.php index 0e54a00..3b166b2 100644 --- a/phpmailer/get_oauth_token.php +++ b/phpmailer/get_oauth_token.php @@ -134,8 +134,8 @@ switch ($providerName) { $provider = new Microsoft($params); $options = [ 'scope' => [ - 'wl.imap', - 'wl.offline_access' + 'https://outlook.office.com/SMTP.Send', + 'offline_access' ] ]; break;