Hi Team, My requirement is to read a particular email from a specific sender. However, I tried using [SenderEmailAddress] = 'no-reply@microsoft.com'
in UiPath C#, but it is not working. Can anyone help me with this?
Regards,
Sai.
Hi Team, My requirement is to read a particular email from a specific sender. However, I tried using [SenderEmailAddress] = 'no-reply@microsoft.com'
in UiPath C#, but it is not working. Can anyone help me with this?
Regards,
Sai.
use the following expression in the Filter
property of the Get Exchange Mail Messages
activity:
"[SenderEmailAddress] = 'no-reply@microsoft.com'"
This will ensure that only emails from the specified sender are retrieved. Adjust the email address as needed for your requirement.
Found helpful, mark as a solution thanks
II have tried this, but it’s not working.
share the full workflow screenshot
Tested and working fine
Use below expression
“@SQL=urn:schemas:httpmail:fromemail LIKE ‘%yourmailid@outlook.com%’”
Detailed Steps:
Inside the filter option - the expression is
Can you please send in C#
Try this:
Pls copy past there same
“[SenderEmailAddress] = ‘no-reply@microsoft.com’”
“@SQL=urn:schemas:httpmail:fromemail LIKE ‘%no-reply@microsoft.com%’”
I need to paste both
no only one
“[SenderEmailAddress] = ‘no-reply@microsoft.com’”
no facing same issue
Is your outlook configure correctly ? if yes, What error are you getting share the error screenshot
I’m able to read emails based on date, time, and the last 100 emails. However, when I try to read emails from a specific sender, I face an issue. There is no error, but it does not retrieve emails from that particular sender.
Check with other sender mail with using previous syntax.
Or try there
“@SQL=urn:schemas:httpmail:fromemail LIKE ‘%no-reply@microsoft.com%’”
I have tried multiple sender mails also but still same issue
Try below full steps and test:
first, drag and drop the Get Outlook Mail Messages activity into your workflow and set the MailFolder property to “Inbox” and the Top property to the desired number of emails, storing the output in a variable like allEmails
. Next, add a For Each activity to iterate through allEmails
, ensuring the TypeArgument is set to System.Net.Mail.MailMessage
. Inside the loop, include an If activity with the condition email.From.Address = "specific_email@example.com"
to filter the emails. Finally, in the Then section of the If activity, add the necessary actions to process the filtered emails, such as reading their subject or body.
Kindly share what you tried and what went wrong to advise more specific.
This should work irrespective of your project is in C# or VB
Kindly confirm following
@ashokkarale,
My requirement is to read emails only from the sender email ID abc@outlook.com. I tried using the filter option with “[SenderEmailAddress] = ‘abc@outlook.com’”, but it’s not working.