MarketplaceStudioActivityExchange Mail Activities

Create your first automation in just a few minutes.Try Studio Web

Exchange Mail Activities

Exchange Mail Activities

by Pawel Wesolowski

StarStarStarStarStarStarStarStarStarStar

0

Activity

Downloads

4.4k

Haha TV
Posted 4 years ago

Hi PW, 

I remember that previously I can view your code for exchange mail here:

https://bitbucket.org/p0tfur/

It seems that it is gone? coz the Retrieve Attachment is very useful but I will need to customize some of the code in order to suit my use, will you upload the source code again?

Pawel Wesolowski
Posted 4 years ago ago

Hello, it is available again on bitbucket.

Jeroen Tjemmes
Posted 4 years ago

Pawel,

Thnx for the quick response and the link with the examples! I miss by the way in the examples a .xaml with looping through the mail?!

I've got a shared mailbox with a subfolder with more than 11.000 mail (read and unread), from which I would like te get the subject and sent date from. After reading in about 4000 mails it gives me the "Microsoft.Exchange.WebServices.Data.ServiceObjectPropertyException: You must load or assign this property before you can read its value." error. 

Unfortunally I can't send you the mails cause these are production data. I've now found the solution by getting the data with get_outlook_mail messages with a top paramter of -1. But this is'nt as quick as your script (reveicing 4000 mails within 2 minutes vs receiving 11.000 mail within 43 minutes by get_outlook_mail_messages)!

Pawel Wesolowski
Posted 4 years ago ago

Jeroen,

I confirm an issue. I successfully builded a test case and I already know where the issue is. During the weekend I will be a working on fix.

As a temporary solution, I can recommend you to read e-mail in batches, lets say 500 e-mails per run, and after each mail move this mail to separate folder (i.e. Done folder), and use try-catch on for each body - when error occurs, restart the process. So this way way you will be able to process all your e-mails, even if error occurs.

Jeroen Tjemmes
Posted 4 years ago

The link: https://bitbucket.org/p0tfur/exchange.mail.activities/src/master/examples/ 

is not accesable with a bitbucket login?

Unfortunally I run also into the same issue as:?! 

I tried to you your code, it said:

Exception has been thrown by the target of an invocation. ----> Microsoft.Exchange.WebServices.Data.ServiceObjectPropertyException: You must load or assign this property before you can read its value.

???

Pawel Wesolowski

Posted a year ago

???

You found a bug. Please provide your worfklow and I will fix it for you. You are referring to some (probably unusual) property, not declared in activity. I tested it with all common properties.

PW

I receive by getting mail the first 4000 mails after that I get the "You are referring to some (probably unusual) property, not declared in activity" message?

Pawel Wesolowski
Posted 4 years ago ago

Hi Jeroen,

you can download examples here: rpaby.pw/download/examples.zip

Unfortunately, I never received requested example where issue was found, so I was not able to provide any fix for it (I am not able to generate this error myself). If you can provide me your workflow (and problematic e-mail if possible?) I can investigate it for you.

Kind regards,

PW

Haha TV
Posted 5 years ago

is it possible to share how you write the "Retrieve Attachment"?

I would like to have more control like renaming attachment with same name, currently there is no way to control it as it is embeded in the activities

Pawel Wesolowski
Posted 5 years ago ago

You can save it to temp folder and rename/move. 

All sources are available here:

https://bitbucket.org/p0tfur/

I will add this option to next version.

Haha TV
Posted 5 years ago

I tried to you your code, it said:

Exception has been thrown by the target of an invocation. ----> Microsoft.Exchange.WebServices.Data.ServiceObjectPropertyException: You must load or assign this property before you can read its value.

Pawel Wesolowski
Posted 5 years ago ago

You found a bug. Please provide your worfklow and I will fix it for you. You are referring to some (probably unusual) property, not declared in activity. I tested it with all common properties.

PW

Haha TV
Posted 5 years ago

Hello Pawel, referring to your answer below, i just see that it has option for me to save the attachment from EWS mailMessage. How can i save the EWS mailMessage as .eml?

Pawel Wesolowski
Posted 5 years ago ago

Hi,

I didn't create activity to save whole message, but you can do it yourself using MimeContent of message and FileStream, please see example:

https://gofile.io/?c=UkK3lf

Haha TV
Posted 5 years ago

How should i save the mail message to local drive? after looping the mail message list

Pawel Wesolowski
Posted 5 years ago ago

Hi,

you can find examples here:

https://bitbucket.org/p0tfur/exchange.mail.activities/src/master/examples/

Dan Wulff Andersen
Posted 6 years ago

I'm not able to find mails in subfolders. What is the syntax to use in "Mailfolder" in "Get Exchange Messages"?

Normal structure would be: "Inbox\Project X\Done", but that is not working

Pawel Wesolowski
Posted 6 years ago ago

Hi Dan,

my apologies for late reply and having troubles with my activity, I should be more specific in manual.

Folder structure for this activity is seen as flat one - so no matter if this is main directory, subdirectory, subsubdirectory and so on, you refer to it just using it's name.

I.e:

For Inbox\test - "test"

For My folder\test\mails - "mails"

I understand that full path reference would be more logical one, so will think about it for next release.

Kind regards,

PW

Publisher

Pawel Wesolowski

Visit publisher's page

License & Privacy

MIT

Privacy Terms

Technical

Version

1.2.0

Updated

June 4, 2023

Works with

Studio: 21.10 - 22.10

Certification

Silver Certified

Application

Microsoft Exchange

Collections

Support

UiPath Community Support

Resources