Update SMTP configuration: switch to Office 365 for email sending and adjust OAuth scopes

This commit is contained in:
vista-man
2025-04-11 09:29:51 +02:00
parent 4e0f6238b6
commit 653bd79d0c
2 changed files with 6 additions and 6 deletions

View File

@@ -107,14 +107,14 @@ $mail = new PHPMailer(true);
try { try {
$mail->isSMTP(); $mail->isSMTP();
$mail->Host = 'smtp.gmail.com'; $mail->Host = 'smtp.office365.com';
$mail->SMTPAuth = true; $mail->SMTPAuth = true;
$mail->Username = 'ticketsopdracht@gmail.com'; $mail->Username = 'ticketsopdracht@outlook.com';
$mail->Password = 'rqxm fbju xbmu qmbr'; $mail->Password = 'ZZ^HyL*vyveJEZ04u&1W'; // Replace with the actual password or app-specific password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587; $mail->Port = 587;
$mail->setFrom('ticketsopdracht@gmail.com', 'Spik & Span'); $mail->setFrom('ticketsopdracht@outlook.com', 'Spik & Span');
$mail->addAddress($email, $name); $mail->addAddress($email, $name);
$mail->isHTML(true); $mail->isHTML(true);

View File

@@ -134,8 +134,8 @@ switch ($providerName) {
$provider = new Microsoft($params); $provider = new Microsoft($params);
$options = [ $options = [
'scope' => [ 'scope' => [
'wl.imap', 'https://outlook.office.com/SMTP.Send',
'wl.offline_access' 'offline_access'
] ]
]; ];
break; break;