"Get Outlook Mail Messages" Activity Does Not Retrieve Mail Body And From Address

How to resolve when "Get Outlook Mail Messages" activity doesn't retrieve Mail Body and From address?

Issue Description: “Get Outlook Mail Messages” activity doesn’t retrieve Mail Body and From address

Note: Check with the local IT team to check the Group policies on their environment, because the group policies configuration can change for different environment. Also do not change any group policies or registry keys, request the local IT team to perform the changes following their change process.

Troubleshooting Steps:

  1. Try checking the Group Policies. Go to Checking Group Policies
  2. Try the powershell test to confirm it is not an UiPath issue
  3. Every time this issue has been seen, it has always come down to Group Policy settings. Either remove the group polices or consider using the 365 activities or one of the other Mail activity offerings.

Checking Group Policies:
  1. Open a command prompt as an administrator
  2. Run the command >gpresult /h %temp%/gpresults.html
  3. Open the file.
  4. Check the Download Group Policy Settings For Windows and Windows Server - a full list of Windows Group Policies
  5. Check to see if the following settings are enabled. If they are, they need to be disabled.

Powershell Test
  1. Check that Get Outlook Mail Message is not retrieving mail body using MailMessage.Body
  2. Try with MailMessage.Headers("HTMLBody")
  3. Check with following PowerShell script to retrieve Mail Body :

Connect Outlook with below command

$Outlook = New-Object -ComObject Outlook.Application
# Now getting all folders info in variable (Shows Email, Calendar, Tasks etc)
$OutlookFolders = $Outlook.Session.Folders.Item(1).Folders
#Now connecting Inbox mails
$OutlookInbox = $Outlook.session.GetDefaultFolder(6)
#Now reading latest mail
$latestmail=$OutlookInbox.items | select -last 1
#Now calling email content and getting email content as output in html

If the above script doesn't return any result, check the Mail Server settings.

Registry Modification : Following Registry changes have been found to work in some cases
  • Set the value of PromptOOMAddressInformationAccess to 2 under KEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\