locked
Subscribe to incoming mails for all users (MTA/EWS API or else?) RRS feed

  • Question

  • Hello,

    My goal is to develop an Exchange listener that will intercept the organization mail box for new mails and for each mail it would do some logic. 

    After i've researched the subject online - i saw that there are two primary ways to do that:

    1) Configure a new MTA (Mail Transfer Agent) that will be situated before the exchange server and will intercept the SMTP messages.

    2) Use EWS API to subscribe to a new mail event and run the login on the listener - in this way i have 2 basic problems:

         a) Is there a way to subscribe to all mailboxes on the exchange server? without looping all the users  ? 

         b) How i can block a client to read his email before my listener handled it ? (can i move the whole incoming mail to a special default folder that the users wouldn't have an access to it  - some king of hidden folder ?)

    Is there other way besides the two that i mentioned to fulfill the demand ?

    Thanks!

    Monday, September 19, 2016 12:42 PM