Skip to content

v1.1.0 - On-premises Exchange (EWS) support

Latest

Choose a tag to compare

@ClaneSharke ClaneSharke released this 19 Sep 08:53

What's new

  • dbo.usp_ReadMailbox_EWS -- a new SQLCLR proc reading an on-premises Exchange mailbox via EWS (Exchange Web Services), Windows/NTLM auth + Exchange Impersonation. Lives alongside the existing Graph-based usp_ReadMailbox in the same assembly.
  • EwsToSqlSync -- a standalone alternative to the EWS proc: a plain .exe you run on a schedule via Windows Task Scheduler, using the same EWS logic but writing to SQL Server with an ordinary login instead of SQL Server CLR. No assembly registration, no trust hashes. Includes MessageId-keyed dedupe so repeat scheduled runs don't insert duplicate rows.
  • Deploy-EWS.sql, Deploy-Full-Remote.sql (fully self-contained deploy with the DLL bytes embedded as a hex literal, so there's no separate .dll file needed on the target server), and Drop-And-Recreate.sql (clean re-deploy when a stale assembly is registered).
  • README.md documents both approaches side by side with a comparison table, plus setup steps for each.

Attached binaries

  • MailboxReaderClr.dll -- built from this tag, net472, contains both MailReader (Graph) and EwsMailReader (EWS)
  • EwsToSqlSync.exe -- the standalone scheduled-task alternative (needs config.json alongside it, see EwsToSqlSync/config.example.json)

Both are provided for convenience; building from source (dotnet build -c Release) remains fully supported and gives you full control over what SQL Server or Task Scheduler ends up trusting/running.

Known limitation

The EWS-based code (both the SQLCLR proc and EwsToSqlSync) has not yet been verified against a live on-premises Exchange server. Treat the exact SOAP request/response shape as a strong first draft to validate against your own Exchange version/CU, per the Troubleshooting sections in README.md.