Monitoring changes to the client mailbox replica

I need to monitor a client mailbox replica and programmatically respond to changes. In particular, I need to detect when an item is added to or removed from a folder either by the user or as a result of replication.

I need to support Notes 6.5.4 through 7. I have not found a way to do this with the Notes 6.5.4 client API, and haven’t looked at the Notes 7 API yet.

I have experimented with EMRegister(), but without luck – for example, EM_NSFADDTOFOLDER doesn’t even seem to trigger at all when new mail arrives.

I’ve searched the forums and see other people trying to accomplish similar things, but all the threads seem to end prior to them finding solutions.

Subject: Monitoring changes to the client mailbox replica

I’m happy to report (for the benefit of anyone who comes across this later) that although EM_NSFADDTOFOLDER does not trigger when new mail is “received”, it does trigger when the new mail is replicated. That makes sense, and seems sufficient for my needs.