Can't Get Outlook Mail Messages

When using Get outlook Mail Messages activity you need to have outlook install and configured with your account in your local machine otherwise it won’t work. Have you done that?

Hi @SamanGuruge ,

my email acct is the only acct configured in my desktop outlook, is there anything else I need to change?

Hi @hihiyou,

The account we are trying to access , is it a default account or additional account.

Additional account to refer to the account you have added on top of the account which is signed in.

If you are not using the additional account - please make the account field blank in properties.


Mukesh

Hi @mukeshkala,

it is an default acct, because I have only logged in one acct on my outlook.

I feel like it’s somehow my uipath cannot access my outlook, but I cant pinpoint what exact reason it can be.

Thanks,
Hihiyou

Can you share a clear screenshot of outlook

Have you tried By keeping the Account Field Blank and Keeping the Folder Name as “Inbox” only .

This will Verfiy that atleast the Outlook it working - Once this works - we can then use the Folder you require.


Mukesh

ya @mukeshkala that’s right

1 Like

Hi @mukeshkala,

I have tried your suggestion, but it still doesnt work(with the same error msg)…I also try to use the “send outlook mail message” activity, which does not need to specify the folder path, and it still failed with the below message:

Thanks,
Hihiyou

What Version of Outlook activities are you using . You can check the same in the project dependencies .

Mukesh

1 Like

hi @hihiyou
which version of outlook are you using?? This error come with legacy outlook version and look more details in following link

Suggestion :- use higher version of outlook such as Outlook 2016 or higher one (check your colleague outlook version that’s why it’s working there )

1 Like

@hihiyou can you 1st check whether Get Outlook Mail Messages activity works with your INBOX or not and also mark the checkbox OnlyUnreadMessages to read-only unread emails.

this is just to check whether this activity works or not then will move ahead with troubleshooting or fixture for the issue, before proceeding please sure you have some unread emails in your inbox if not then mark some email as unread in you inbox and debug the workflow.

Note - I have outlook 2007 installed in my system and it perfectly works for me.

1 Like

hi @indrajit.shah, I checked the Get Outlook Mail Messages activity and it can’t even access to my inbox, and return the same error message.

hi @SamanGuruge, my outlook version is Version 1808, I think it should be updated versions instead of legacy ones.

hi @mukeshkala, for the outlook activities version, do you mean this ?
image

hi @hihiyou,

Can you please try downgrading the Mail activities to 1.3.0 with lowest applicable version from manage packages.

image


Mukesh

Hi @mukeshkala

I tried to downgrade it and got the below error:

Send Outlook Mail Message: Unable to cast COM object of type ‘Microsoft.Office.Interop.Outlook.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Outlook._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00063001-0000-0000-C000-000000000046}’ failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).

Are you using Outlook 365? If so you need to download the Mircosoft 365 activities avaliable here: Microsoft Office 365 - RPA Component | UiPath Marketplace

1 Like

Hello,

My work around to using “Get Outlook mail Messages” was using “Get IMAP Mail Messages” and entering in 993 for the port and the server email address of : outlook.office365.com

Try it and see if you have any success with it.

An ArgumentOutOfRangeException exception is thrown when a method is invoked and at least one of the arguments passed to the method is not null and contains an invalid value that is not a member of the set of values expected for the argument. The ParamName property identifies the invalid argument, and the ActualValue property, if a value is present, identifies the invalid value.

Typically, an ArgumentOutOfRangeException results from developer error. Instead of handling the exception in a try / catch block, you should eliminate the cause of the exception or, if the argument is returned by a method call or input by the user before being passed to the method that throws the exception, you should validate arguments before passing them to the method.

I too have a similar issue. I request immediate assistance with this.


See below:


22.4.3+Branch.master.Sha.926b4e643842c0bd04601053628fabcad850b6c3

Source: Get Outlook Mail Messages

Message: The specified folder does not exist

Exception Type: System.ArgumentException

RemoteException wrapping System.ArgumentException: The specified folder does not exist
at UiPath.Mail.OutlookAPI.GetMessages(MAPIFolder inboxFolder, Int32 count, MailFilterVariant filterVariant, EOrderByDate orderByDate, Boolean onlyUnread, Boolean markAsRead, Boolean getAttachments, CancellationToken cancellationToken)
at UiPath.Mail.Outlook.Activities.GetOutlookMailMessages.<>c__DisplayClass40_0.b__0()
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.Mail.Activities.Extensions.TaskExtensions.<TimeoutAfter>d__11.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Mail.Activities.GetMailActivity.d__13.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi @indrajit.shah,

I have outlook 2007 and I am using GetOutlookMailMessage activity, I have unread mail in my inbox and it throws error "RemoteException wrapping System.Exception: Job stopped with an unexpected exit code: 0xC0000005
", Could you please help me with this if it working perfectly at your end with outlook 2007.

@indrajit.shah
Please ignore my first query, downgrading system mail activities to 1.3.0 worked for me perfectly.
Thanks Anyway

1 Like