MS Exchange Listener

Our client asked us to create a listener service which would capture emails sent to a nominated account in MS Exchange 365; this account was setup to receive all emails sent to/from all other company accounts so that email correspondence could be automatically uploaded to their CRM application – if the recipient/sender was linked to a Customer held in the database.

We accomplished this using the Enterprise Web Services (EWS) provided by Microsoft which allow us to create a subscription to the account in question and to then poll the account for new emails – pulling down the latest messages and checking the central database and uploading the message