Mailer Check -- > Delete Message (Enabled) Does not generate ticket

I am using Gmail with Delete Message enabled in Mailer check configuration and notice that it deletes the email from server and ticket is not getting generated in trudesk. when disabled it is working as expected.

Log view:
Trudesk is crashing while parsing mail content for creating tickets. Attaching snapshot for your reference

GMAIL IMAP (Same with office 365 too) configuration is used for mail check. Incoming Email address is already mapped to an Agent.
-> It checks and detects an email
-> Deleted it from server
-> sudden exception while parsing content
-> trudesk restarts