From 6b6d847756b4146044e98f48156e3d839d0597ef Mon Sep 17 00:00:00 2001 From: cs2000 Date: Wed, 4 Feb 2026 13:23:03 +0000 Subject: [PATCH] Changes for M365 oAuth - Added web-based Microsoft OAuth onboarding UI in Mail settings, including a Connect Microsoft 365 button and auto-generated callback URI display. - Added Test OAuth Token Refresh UI section. - Updated visibility logic so Test Email Sending and Test IMAP Connection show correctly for OAuth-based configs (not only host/password configs). --- admin/settings_mail.php | 1085 +++++++++++++++++++++------------------ 1 file changed, 590 insertions(+), 495 deletions(-) diff --git a/admin/settings_mail.php b/admin/settings_mail.php index eb0dee02..923739cd 100644 --- a/admin/settings_mail.php +++ b/admin/settings_mail.php @@ -1,495 +1,590 @@ - - -
-
-

SMTP Mail Settings (For Sending Email)

-
-
-
- - - -
- -
-
- -
- -
- - Choose your SMTP provider. OAuth options ignore the SMTP password here. - -
- - - -
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
-
- -
-
- -
- -
- -
-
-
-
- -
- -
- - - -
-
-
- -
-
-

IMAP Mail Settings (For Monitoring Ticket Inbox)

-
-
-
- - -
- -
-
- -
- -
- - Select your mailbox provider. OAuth options ignore the IMAP password here. - -
- - -
- -
-
- -
- -
-
- -
- -
-
- -
- -
- -
-
-
- - - - -
- - - -
-
-
- -
-
-

Mail From Configuration

-
-
-
- - -

Each of the "From Email" Addresses need to be able to send email on behalf of the SMTP user configured above -

System Default
-

(used for system tasks such as sending share links)

-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
Invoices
-

(used for when invoice emails are sent)

- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
Quotes
-

(used for when quote emails are sent)

- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
Tickets
-

(used for when tickets are created and emailed to a client)

- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- - - -
-
-
- - - -
-
-

Test Email Sending

-
-
-
- - -
- - -
- -
-
-
-
-
- - - - - -
-
-

Test IMAP Connection

-
-
-
- - -
- -
-
-
-
- - - - - - + +
+
+

SMTP Mail Settings (For Sending Email)

+
+
+
+ + + +
+ +
+
+ +
+ +
+ + Choose your SMTP provider. OAuth options ignore the SMTP password here. + +
+ + + +
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+ + + +
+
+
+ +
+
+

IMAP Mail Settings (For Monitoring Ticket Inbox)

+
+
+
+ + +
+ +
+
+ +
+ +
+ + Select your mailbox provider. OAuth options ignore the IMAP password here. + +
+ + +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ + + + + + +
+ +
+
+ +
+ +
+ +
+
+ + Add this callback URI in Entra App Registration, then click Connect to authorize and store refresh token automatically. + +
+ +
+ + + +
+
+
+ +
+
+

Mail From Configuration

+
+
+
+ + +

Each of the "From Email" Addresses need to be able to send email on behalf of the SMTP user configured above +

System Default
+

(used for system tasks such as sending share links)

+
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
Invoices
+

(used for when invoice emails are sent)

+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
Quotes
+

(used for when quote emails are sent)

+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
Tickets
+

(used for when tickets are created and emailed to a client)

+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ + + +
+
+
+ + + + + +
+
+

Test Email Sending

+
+
+
+ + +
+ + +
+ +
+
+
+
+
+ + + + + + + +
+
+

Test IMAP Connection

+
+
+
+ + +
+ +
+
+
+
+ + + + + + + +
+
+

Test OAuth Token Refresh

+
+
+
+ + + +

+ This validates your refresh token and stores a new access token for + . +

+ + +
+
+
+ + + + + +