Mail retrieve attachments does not work

Hello UiPath forum,
when using the use destop outlook app + get outlook mail messages everything works fine.
When selecting the “retrieve attachments” checkbox i get an error “cannot download attachments” and “the underlying email provider for this message could not be determined”.
Any hint or help appreciated.
Best regards,
Jo

Screenshot without retrieving attachments (working)

Screenshot with retrieving attachments (error)

Hey @Joachim
Did you check out this thread

Regards,

Hi @Joachim

Inside the for each activity, can you try the ‘Save Attachment’ activity once?

Please let us know if this works,

Best Regards.

@Joachim

When you use a for each mail activity you need not use get outlook mail message again…

In the list of emails field pass outlook.Folder("Inbox") and it would automatically read the mails…no separate get outlook mail messages is needed…that should clear the issue for you

Hope this helps

Cheers

Hello Chirag,
yes, i’ve read the thread.
It says to select the “retrieve attachments” checkbox, which i did.
Best regards, Jo

Hey @Joachim

Glad it helped you :slightly_smiling_face:

Cheers.

Hello Chirag,
unfortunately this thread did not help.
I am now trying to move the for each mail outside of the “use desktop outlook app”.
But the Outlook element does not offer the .Folder option.
Best regards,
Jo

@Joachim

Use outlook desktop app stays. And inside that use for each ui element and then use outlook.folder("foldername")

Cheers

Hey @Joachim
I would suggest you to check the subject of the mail.
Also mark to only unread messages mail and make sure the mail being retrieved in unread.
Then use save attachment.

Regards,

Hello Anil,
moved the for each email back into the outlook app activity.
But the for each mail does not recognize the outlook folder.
Do you have any idea how to solve this?

Thanks and best regards, Jo

@Joachim

Can you try giving this and see the folder name properly how its returned

Outlook.SearchFolder("RPA")

and check if the account you used is correct…you can do that by using this in log messages

Outlook.SelectedAccount

Alternately outlook.SelectedFolder will give the current Selected folder in outlook…can be used to check if connected to correct account

cheers

Hello Anil,
i like the idea of printing a log message, but the outlook object is not set to an instance of an object.
“Log Message: Object reference not set to an instance of an object.”
Maybe this is also the reason why it is not possible to access the email folder.
Best regards, Jo

@Joachim

Then that means outlook did not connect…once it is inside the use desktp application it wont be null at all…unless the connection failed

Cheers

Hello Anil,
the for each mail loop is inside the use desktop outlook app.
And when using it without retrieving attachments it works great and connects.
And, if i look into the local variable watch, the Outlook has the eamails from the email folder.


Best regards, Jo

@Joachim

By default a audit mesaage would come once you are inside the outlook scope in the output panel…can you confirm if you are seeing your email id there

Here i see selected account is also null from the image…check the bottom of the image

For each mail activity is working because you are sending input from get outlook mail messages not because of the use outlook app…you did not even link them together…till you pass the list of emails using outlook folders it does not work as inside of use outlook app

Cheers

Hello Anil,
you are right in the regard that the outlook account (folder) is not connected to the use desktop outlook app.
And the Outlook.SelectedAccount is also null.
Is it possible that the Account value of the use desktop outlook app is not correct?
I’m gonna check this. Does the Account has to be the same as the one for get outlook mail messages?
Best regards, Jo

@Joachim

Yes the account value is not correct…that is to be corrected…are you not selecting account from dropdown

Cheers

Hello Anil,
no i am not selecting from drop down.
The user is supposed to be another user that the AD-user of the PC.
It’s the RRA-user (from the config), not me.
Best regards, Jo

I am using the exact same account for the “use desktop outlook app” as for the “get outlook mail messages”.
It works for “get outlook mail messages” but it does not work for “use desktop outlook app”.
Where is the difference and how do i correctly configure the account for “use desktop outlook app”.
Best regards, Jo