Is it possible to get the Sent Email and Inbox List ,if we send email form Send Exchange Mail server in UIPath

Hi Team,

We have an requirement to send emails to customers from Send Exchange Mail server,after that we have requirement to get the list of Inbox Emails(Which mail messages are not delivered).
Is it possible to do from UI Path?
Appreciate your inputs!


Use Get Exchange Mail Message activity to read undelivered mails.


Hi @lakshman

How can we get the emails only with the subject “Mail Delivery System” and copy the email id from the body of undelivered email.
Attached my workflow.Read Emails( Inbox_EmailsList)_Exchange Server.xaml (7.4 KB)


Please check below thread.

1 Like

Hi @lakshman @Palaniyappan

I can able to capture the subject of failed emails ,but i need emails from the body of undelivered emails.
Appreciate your help!
Attached my workflow.Read Emails(Inbox and Sent Items_Subject).xaml (7.2 KB)


  1. After getting mails use ForEach loop to iterate one by one mail.

        ForEach item in mailMessages
              IF item.Subject.Contains("Undelivered")
1 Like

Hi @lakshman ,

I have tried with this code and its copying total body and how can i get only email id from body of email.

1 Like


Assign the body of the mail to one String variable and then use below Regular expressions to get Email Id from that.

1 Like

Hi @lakshman,

This regular expression not copying the email,could you please check my workflow is correct?


May I know what error are you getting here ?

1 Like


It should be like this.


Its not copying anything to text file ,with message box i tried to print and its displaying empty.


And also you can use below activity and it will give output as collection of matching strings.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.