Docs
Architecture
How go-mapi’s desktop app and DLL interceptor bridge Windows MAPI to Gmail.
go-mapi v3 uses a small desktop app and a local DLL interceptor:
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ Windows App │ │ go-mapi Desktop │ │ Gmail │
│ (Explorer, etc.) │ │ App │ │ │
│ │ │ │ │ │ │
│ MAPISendMail() │ │ Compose handoff │ │ Compose window │
│ ▼ │ │ │ │ │
│ ┌─────────────┐ │ │ │ │ │
│ │ go-mapi.dll │────┼─────────▶│ Request handler │─────────▶│ User reviews/send │
│ └─────────────┘ │ │ │ │ │
└─────────────────────┘ └─────────────────────┘ └─────────────────────┘Components
| Component | Technology | Purpose |
|---|---|---|
| Interceptor DLL | C++ | Captures Windows MAPI calls locally |
| Desktop app | Go | Handles intercepted requests and opens the Gmail compose flow |
| Setup app | Windows installer | Installs binaries and registers the local mail handler |
How It Works
- A Windows app calls
MAPISendMail()(e.g., right-click → “Send to” → “Mail recipient”) - go-mapi.dll intercepts the call on the user’s PC
- The go-mapi desktop app receives the request
- The desktop app opens the Gmail compose flow with the attachments
- The user reviews and sends from Gmail
Why This Design?
- Installer-first — Desktop app and DLL interceptor are installed together
- No browser dependency — v3 does not require a browser extension or native messaging host
- Lightweight — The resident desktop app typically uses about 30-50 MB RAM
- No cloud dependency — Everything runs locally, no data leaves your machine
Source Code
All components are in the go-mapi repository :
go-mapi/
├── dll/ # C++ MAPI interceptor DLL
├── app/ # go-mapi desktop app
└── installer/ # Windows setup app