Skip to content
Case study Windows desktop app · email mail-merge

MailMerge

Personalized email mail-merge for Windows — from spreadsheet to send, with a different attachment per recipient.

.NET 10 rewrite (from .NET 4.8)
≈160 xUnit unit tests
4 sending providers
100% .mame format compatible

Overview

MailMerge turns a contact list — CSV, Excel (.xlsx/.xlsm), Google Sheets or Outlook contacts — into individualized emails: [Column] field merging, conditional content and a per-recipient attachment. Sending is multi-provider and fully configurable: Microsoft 365 (Graph), SMTP, Brevo or the Outlook installed on the PC.

The project is a full rewrite of a legacy WinForms (.NET Framework 4.8) application into a modern .NET 10 / WPF architecture following the MVVM pattern, while keeping full binary compatibility with the legacy project format (.mame): existing files open and re-save with no loss. The app covers the entire mail-merge cycle — data import, rich-text message composition (RTF↔HTML), attachment resolution and verification, recipient-by-recipient preview, supervised sending (pause/resume, throttling, quotas, retry of failures) and an exportable log. It is shipped and in production.

Key features

Key features

01

Multi-source import

Recipient import from CSV, Excel (.xlsx/.xlsm), Google Sheets and Outlook contacts.

02

Merge engine

[Column] fields and conditional [if/else] content to personalize every message from the list data.

03

Per-recipient attachments

A different attachment per recipient, resolved through five methods, with a verification grid before sending.

04

Multi-provider sending

Microsoft 365 (Graph, delegated and app-only), SMTP (incl. OAuth2 and Integrated Windows Authentication), Brevo (API) or desktop Outlook — configurable and interchangeable.

05

Supervised sending

True pre-send preview, test email, then a supervised campaign: pause/resume, throttling, daily quotas, retry of failures and scheduled send.

06

Composition & templates

Rich-text editor (RTF↔HTML), reusable message templates and unsubscribe management.

07

.mame compatibility

Full backward compatibility with the legacy .mame project format, both read and write (lossless round-trip).

08

Security

Locally encrypted secrets (Windows DPAPI), a digitally signed license (ECDSA, tamper detection) and corporate proxy support (NTLM/Kerberos).

09

Bilingual & themes

Bilingual FR/EN UI and light/dark theme.

Screenshots

Screenshots

Data step: CSV / Excel import, column mapping and the recipients list.
Message step: rich-text editor, field insertion and conditional if/else blocks.
Attachments step: per-recipient file resolution rule.
Preview step: true rendering of a recipient before sending, with its attachment.
Settings: Microsoft 365, SMTP, Brevo and Outlook sending profiles.
Log: last send history, statuses and CSV export.

Architecture & engineering

The architecture cleanly separates three responsibilities: the business logic (the mail-merge core), the sending layer and the WPF UI. The sending layer rests on an IMailSender abstraction and a provider factory — adding or replacing a sending channel touches neither the core nor the UI. Everything is wired through dependency injection (Microsoft.Extensions).

Security is handled end to end: secrets — passwords, API keys, OAuth2 client secrets — are encrypted locally through Windows DPAPI, never stored in clear text. A signed licensing system (ECDSA digital signatures, tamper detection) and corporate proxy support (NTLM/Kerberos) allow deployment in constrained environments. Microsoft 365 integration builds on the Microsoft Graph SDK v6 and Azure.Identity (OAuth2 / Entra ID), in both delegated and app-only flows.

Quality is held by a suite of roughly 160 automated tests (xUnit) covering the merge engine, attachment resolution and .mame serialization. Data comes through ClosedXML (Excel) and CsvHelper (CSV), SMTP sending through MailKit / MimeKit, and the message preview renders via WebView2.

What this project demonstrates

MailMerge brings a broad engineering span together in a single product: software architecture and clean code, Windows desktop development, API integration (Microsoft Graph, Brevo), authentication and security (OAuth2 / Entra ID, encryption, digital signatures), COM interoperability with Outlook, internationalization, data processing (CSV/Excel) and automated testing.

Above all it illustrates a modernization skill: taking a legacy application (WinForms, .NET Framework 4.8), cleanly re-architecting it in .NET 10 / WPF / MVVM and industrializing it through to distribution, without ever breaking compatibility with users' existing files.

Technologies

C# 13 .NET 10 WPF XAML MVVM CommunityToolkit.Mvvm Microsoft.Extensions DI Microsoft Graph SDK v6 Azure.Identity MailKit / MimeKit API Brevo Outlook COM interop ClosedXML CsvHelper WebView2 DPAPI ECDSA xUnit

Let's work together

A project or assignment in mind? Let's talk.

Get in touch