Mail checker not working for gmail

I have provided Gmail Imap settings but emails are not getting converted into tickets. Also i don’t see any error logs.
My Mailer check settings

What am i missing ?

Here is my Gmail IMAP settings

can you add your logs as well?

After turning on the “Less secure app access”. Its working fine now

For Microsoft 365 IMAP i see following errors:
IMAP: outlook.office365.com
Port: 993

^[[A0|trudesk | { Error: Command Error. 10
0|trudesk | at Connection._resTagged (/etc/trudesk/node_modules/imap/lib/Connection.js:1502:11)
0|trudesk | at Parser. (/etc/trudesk/node_modules/imap/lib/Connection.js:194:10)
0|trudesk | at Parser.emit (events.js:198:13)
0|trudesk | at Parser._resTagged (/etc/trudesk/node_modules/imap/lib/Parser.js:175:10)
0|trudesk | at Parser._parse (/etc/trudesk/node_modules/imap/lib/Parser.js:139:16)
0|trudesk | at Parser._tryread (/etc/trudesk/node_modules/imap/lib/Parser.js:82:15)
0|trudesk | at TLSSocket.Parser.cbReadable (/etc/trudesk/node_modules/imap/lib/Parser.js:53:12)
0|trudesk | at TLSSocket.emit (events.js:198:13)
0|trudesk | at emitReadable
(_stream_readable.js:555:12)
0|trudesk | at process._tickCallback (internal/process/next_tick.js:63:19) type: ‘bad’, textCode: undefined, source: ‘protocol’ }