Get Outlook Mail Message - Unable to Fetch Sender's Email Address

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.

 

  1. 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.