Unable to fetch the sender's email id from the outlook for some of the emails, however Customer is able to fetch the subject,headers etc. The issue is with mail.sender.address and mail.from.address for the emails that are sent from functional mail boxes and the emails that are sent on behalf of some other person.
It looks like this is an limitation of the product. This was not been implemented due to some compatibility issue. However the same can be achieved using the below workarounds.
- Workarounds - Using "MailItems objects" instead of "MailMessage objects"
- Instead of using the activity GetOutlookMailMessages and having the output in a list of type "MailMessage", read the mails as type "mailItems".
- Pass the mailItem to VisualBasic where there we can fetch the property MailItem.SentOnBehalfOfName
2. Custom activity - A custom activity can be built to get this done.
- Write a custom C# code to read from and sender, build it and convert into a package, this will then be available as a activity in UiPath that can be used.
- Below link should be able to give more details on how to use custom activity.