0
votes

Everyone in our office is setup with their own mailbox. But a few special ones have access to a shared mailbox. I have written an app to track email activity on this "shared" mailbox using EWS API.

The problem i encountered is when an email is deleted. The app detected a "moved" event. From the event, it gets the new folder which happens to be the personal "Deleted" folder. Is there a way to get the owner of that "Deleted" folder via EWS API?

There's a workaround solution I came up which is to import all user's email folders. This solution works, it is just tedious to maintain because we have new/remove users almost every week.

1

1 Answers

0
votes

If you use ConvertId with a generic non resolvable email address it should the return the actual address the FolderId belongs to when you try a convert eg

        AlternateId aiAlternateid = new AlternateId(IdFormat.EwsId, SharedFoder.Id.UniqueId, "[email protected]");
        AlternateIdBase aiResponse = service.ConvertId(aiAlternateid, IdFormat.EwsId);
        Console.WriteLine(((AlternateId)aiResponse).Mailbox);

(Where SharedFolder is an EWS Managed API folder).

Cheers Glen