A generic Simple MAPI bridge between 32-bit and 64-bit Windows.
Many 32-bit applications — legacy ERPs, invoicing/quoting tools, CAD
software, anything built years ago and never ported — still send email
through the old Simple MAPI API (MAPILogon / MAPISendMail /
MAPILogoff). That API resolves a mail provider from the 32-bit registry
view, which is exactly where modern 64-bit-only mail clients (Thunderbird,
and increasingly others) simply aren't registered anymore. The result: the
32-bit application's "Send email" button fails, with no 32-bit build of the
mail client available to fix it.
OpenMailBridge relays that call across the bitness boundary instead of reimplementing any mail client's logic: your 32-bit software makes a normal Simple MAPI call, a small shim DLL forwards it over a local named pipe to a 64-bit relay, and that relay replays a real Simple MAPI call — natively, in the 64-bit registry view where your real mail client is properly registered. The mail client's own compose window opens, pre-filled, exactly as if the 32-bit software had called it directly. No SMTP credentials are ever handled or stored; the actual mail client does the actual sending, as it always did.
32-bit software --(Simple MAPI)--> MailShim32.dll --(named pipe, JSON)--> OpenMailBridge.Relay (64-bit) --(Simple MAPI)--> your real mail client
MailShim32.dll(C++, x86) — registers itself as the system's Simple MAPI provider for 32-bit callers. Contains no business logic: it captures theMapiMessagethe caller passed in, serializes it, sends it over a named pipe, and returns whatever code the relay sends back.OpenMailBridge.Relay(.NET, x64) — receives the request and replays a genuine Simple MAPI call against the real, natively-registered 64-bit mail provider (MAPILogon→MAPISendMailwithMAPI_DIALOG→MAPILogoff).OpenMailBridge.Tray(.NET, WinForms) — a notification-area icon that hosts the relay and exposes a one-click Activate/Deactivate toggle. Runs in the interactive user session (not a Windows service — the compose window has to be visible on screen), and deliberately does not run elevated: see Why the Tray doesn't run as administrator below.
The bridge never hardcodes a mail client's name anywhere. It's a generic Simple MAPI client, standing on the correct side of the 32/64-bit boundary — nothing more.
- Windows 10/11, 64-bit
- .NET 8 Desktop Runtime (installer is framework-dependent, not self-contained)
- A Simple MAPI–compliant 64-bit mail client already installed and set as the default mail app (Thunderbird is the one this has been built and tested against)
Download the latest OpenMailBridge-Setup-<version>.exe from
Releases and run it. It will:
- Install the 64-bit Relay/Tray under
Program Files\OpenMailBridgeand the 32-bit shim underProgram Files (x86)\OpenMailBridge. - Register a scheduled task that starts the Tray at logon.
- Optionally (checked by default) activate the bridge immediately — i.e. register it as your system's default Simple MAPI provider.
You can toggle activation at any time from the Tray icon's context menu (Activate/Deactivate) — no reinstall needed either way.
git clone <this repo>
cd OpenMailBridge
.\scripts\build-installer.ps1Requires Visual Studio with the "Desktop development with C++" workload,
the .NET 8 SDK, and Inno Setup
(winget install JRSoftware.InnoSetup). Produces
dist\OpenMailBridge-Setup-<version>.exe.
To install straight from a source checkout without building the packaged
installer, scripts\install.ps1 (run from an elevated PowerShell) does the
same file layout + scheduled task setup directly.
Uninstall via Settings > Apps (or Control Panel > Programs and Features) like any other Windows application. This does a full reset: restores whichever mail provider was configured before OpenMailBridge was first activated, removes the scheduled task, deletes all installed files, and clears its logs and backup data — nothing is left behind.
See docs/runbook.md for log file locations, common errors, and manual rollback steps.
The Tray hosts the pipe server that drives the real mail client's compose
window. Windows' UIPI (User Interface Privilege Isolation) prevents an
elevated process from reliably controlling a non-elevated one's UI — which
is exactly what happens if the Tray runs elevated: MAPISendMail hangs
against a normal-privilege mail client. So the Tray always runs at normal
integrity level; only the one-time registry write (the Activate/Deactivate
toggle) elevates on its own, via its own UAC prompt, each time it's used.
All planned milestones (native shim, pipe relay, MAPI registry redirection, tray UI, log rotation, packaged installer) are implemented and tested end-to-end against Thunderbird. See plan-mapi-bridge.md for the full implementation history and architecture notes, including a couple of undocumented Windows MAPI registry quirks discovered along the way.