Hope everyone is staying healthy and safe.
We are facing a strange issue with reading the unread email in Gmail using the IMAP, so wanted to check if anyone could help or point us in the right direction.
The automation basically is trying to check if there are any unread email with a particular subject, which comes every day at a certain time. Once it finds it, it would download the attachment and do other processing.
The email settings for IMAP are turned on and also Less Secure app access is turned on as we have 2FA. The same settings works in DEV, UAT and also in PROD at certain condition. The issue here is:
- When the automated email is received, the process is not able to find the email although the subject matches and also is in unread status. The process simply sends out notification email that it was not able to find any email that matches the criteria.
- However, when we forward the same email with the same subject line and keep that one as unread, the process is able to find the email correctly and proceed forward with other steps.
We are currently not able to pin point where the issue is occurring. Is it some other Gmail settings or the daily automated email that we are receiving, not able to conclude.
Would appreciate any help on the above.