In-House Transactional Email Service (Mailgun Alternative)

I built an in-house alternative to Mailgun — standalone PHP endpoints that use Microsoft Graph SDKs to subscribe to a shared mailbox and maintain threaded email conversations over the organization’s own Microsoft 365 channel. Programmatic, threaded email, with no third-party transactional-email service.

Transactional Email Without the Middleman

Sending and tracking threaded email programmatically usually means paying a service like Mailgun and routing company mail through a third party. We already had Microsoft 365 — the question was whether we could get the same threaded, programmatic capability directly off our own shared mailbox instead.

Code editor on screen

What I Delivered

Code editor open on a laptop screen

Standalone PHP endpoints

Built self-contained PHP endpoints — no third-party email service in the loop.

Michał Frąckowiak - Office computers

Microsoft Graph subscription

Used Microsoft Graph SDKs to subscribe to a shared mailbox and react to mail events.

Syntax-highlighted code on a dark screen

Threaded conversations

Maintained real threaded conversations over the email channel, not one-off sends.

Multiple workstation monitors

On our own M365 channel

Kept everything on the organization’s own Microsoft 365 mail, fully in-house.

Mailgun Replaced
0
Core Deliverables
0
Skills & Tools
0
Person typing on a laptop

The Impact

A working in-house transactional-email service — PHP endpoints subscribed to a shared mailbox via Microsoft Graph, maintaining threaded conversations — delivering what a paid service would, on infrastructure we already own.

Own the Channel You Already Pay For

Paying a third party to send email you could send yourself is a subscription hiding in plain sight. Building the endpoints on Microsoft Graph turned our existing mailbox into a programmatic, threaded email service — no middleman, no recurring bill.

Image credits: “Michał Frąckowiak – Office computers” by Michał Frąckowiak (CC BY-SA 2.0)

Have a project like this?

Programmatic email without a third-party bill. Let’s build it in-house.

More Projects

Coding workstation with a laptop
Web Development & Platforms

JDSileo.com Redesign & Platform Revamp

A ground-up revamp of my own platform: 123 case studies elevated into one design system, 170 branded archives, and a one-page site with a scored intake and live Teams booking — built AI-assisted with Claude Code (Opus & Fable).

Read More »