Mailer - Email for Case Creation

I am unable to get the email to create a ticket feature working with an Office 365 mailbox. I have proper credentials, however the Trudesk logs says Logon Failure for Imap. I have followed the instructions. The Trudesk instance is on a digital ocean cloud droplet, on Ubuntu. I have ensured that in addition to port 8118, I have port 993 open in both directions in case that was an issue. Any suggestions would be appreciated.

Here is the latest log entry:

09-29-2022 23:57:07 [60706] ^[[31merror^[[39m: LOGIN failed. - Error: LOGIN failed.
at Connection._resTagged (/etc/trudesk/node_modules/imap/lib/Connection.js:1502:11)
at Parser. (/etc/trudesk/node_modules/imap/lib/Connection.js:194:10)
at Parser.emit (node:events:513:28)
at Parser._resTagged (/etc/trudesk/node_modules/imap/lib/Parser.js:175:10)
at Parser._parse (/etc/trudesk/node_modules/imap/lib/Parser.js:139:16)
at Parser._tryread (/etc/trudesk/node_modules/imap/lib/Parser.js:82:15)
at TLSSocket.Parser.cbReadable (/etc/trudesk/node_modules/imap/lib/Parser.js:53:12)
at TLSSocket.emit (node:events:513:28)
at emitReadable
(node:internal/streams/readable:578:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21)

Might be related to OAuth 2 in Office 365:

Authenticate an IMAP, POP or SMTP connection using OAuth | Microsoft Learn

Does anyone know if Trudesk supports this OAuth 2?

It does not. You will need to use Legacy Auth for Office 365.