BluePrism - Move or upload a mail from one email Inbox to a different one

25 Views Asked by At

I need to move an email from one inbox to another one. This is different from forwarding the email itself, since I need to preserve the original content of the message (i.e. if we forward an email from the first to the second inbox, then we would change the email sender, and this is not acceptable). Thus I'd like to ask if there exist an object allowing me to: -move an email from an inbox to a different one preserving all the original content of the message, or -upload a previously downloaded email, with .eml extension, to an inbox, maintaining the original content.

I'll make an example in order to be more precise. Let's suppose we have address 1 as [email protected] and address 2 as [email protected]. An email received in [email protected] should be moved to [email protected] without performing any forward operation.

I specify that I'm now using BluePrism objects to manage email inboxes, such as Outlook Exchange Web Services (EWS) and POP3SMTP: my goal is to manage emails interacting with them by server, so the frontend interaction with Outlook it to be excluded.

The application in use is Microsoft Office Professional Plus 2019 - Outlook, version 1808.

I have been suggested to use the VBO object Microsoft Outlook VBO - Digital Exchange, but it does not work via server since the Outlook client must be opened, thus that's not suitable for me.

1

There are 1 best solutions below

0
Glen Scales On

The EWS Api supports this through using ExportItems and UploadItems https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/uploaditems-operation, most of the blueprism examples for EWS seem to use the EWS Managed API which doesn't support these two operations however there is a Branch where someone has implemented support for it https://github.com/search?q=repo%3AOfficeDev%2Fews-managed-api+exportitems&type=pullrequests so you could compile a dll from that branch and use the code sample in the pull request. If this is Exchange Online then EWS is going away at some point in future so this code may break in 2026 if its onPrem you should be good.