Hello UiPathCommunity,
Microsoft announced that, effective October 1, 2022, They will begin to permanently disable Basic Authentication in Exchange Online in all tenants, regardless of usage, with the exception of SMTP Auth. as Basic Authentication is an outdated industry standard.
Its time to use Microsoft implementation of Modern Authentication (OAuth), which is the newer and more secure version of authentication to Microsoft platforms. We can achieve this in UiPath using Microsoft Office 365 activities.
To enable the Microsoft Office 365 activities, your app must be integrated with the Microsoft identity platform and have the correct Microsoft Graph API permissions assigned to it. Please check the below thread and configure the same in your Organization.
https://docs.uipath.com/activities/docs/office365-setup
Here, we need to pass the query for filtering returned emails.
Note: All Microsoft Office 365 activities should be inside Microsoft Office 365 Scope activity.
Below are the queries used for filtering the returned emails using Get Mail activity.
1. Get Emails with Subject contains particular text
"contains(subject, 'subject you are looking for')"
2. Get Emails with Subject Equals to particular text
"subject eq 'subject you are looking for'"
3. Get Emails with Subject starts with particular text
"startsWith(subject, 'subject you are looking for')"
4. Get Emails with Subject ends with particular text
"endsWith(subject, 'subject you are looking for')"
5. Get Emails with Body contains particular text
"contains(body/content, 'body you are looking for')"
6. Get Emails with Body Equals to particular text
"Body eq 'body you are looking for'"
7. Get Emails with Body starts with particular text
"startsWith(body/content, 'body you are looking for')"
8. Get Emails with Body ends with particular text
"endsWith(body/content, 'body you are looking for')"
9. Get Emails from specific recipients
"contains(from/emailAddress/address, 'EmailID')"
10. Get Emails if received date is greater than particular date
"receivedDateTime gt yyyy-MM-dd"
11. Get Emails if received date is less than particular date
"receivedDateTime lt yyyy-MM-dd"
12. Get Emails if received date is greater than or equal to particular date
"receivedDateTime ge yyyy-MM-dd"
13. Get Emails if received date is less than or equal to particular date
"receivedDateTime le yyyy-MM-dd"
14. Get Emails with Subject contains particular text and body contains particular text
"contains(subject, 'subject you are looking for') and contains(body/content, 'body you are looking for')"
15. Get Emails with Subject contains particular text or body contains particular text
"contains(subject, 'subject you are looking for') or contains(body/content, 'body you are looking for')"
16. Get Emails with Subject Not equals to particular text
"subject ne 'subject you are looking for'"
17. Get Emails with Body Not equals to particular text
"Body ne 'body you are looking for'"
18. Get Emails with Subject contains particular text
"contains(subject, 'subject you are looking for') and (hasAttachments eq true)"
19. Get Emails if received datetime is greater than particular datetime.
"receivedDateTime gt yyyy-MM-ddTHH:mm:ssZ"
20. Get Emails if received datetime is less than particular datetime.
"receivedDateTime lt yyyy-MM-ddTHH:mm:ssZ"
21. Get Emails if received datetime is greater than or equal to particular datetime.
"receivedDateTime ge yyyy-MM-ddTHH:mm:ssZ"
22. Get Emails if received datetime is less than or equal to particular datetime.
"receivedDateTime le yyyy-MM-ddTHH:mm:ssZ"