# How to Vibe Code Your Own Airmail (and Stop Paying for It)

> Lightning Fast Email Client for iPhone, iPad, Mac and Vision Pro

- Site: https://airmailapp.com
- Category: Productivity
- Platforms: macOS app, iOS app
- Verdict: **Don't bother** (15/100 vibecodeable)
- Estimated effort: 6+ months of full-time work

## Verdict

Keep paying for Airmail or use Apple Mail, because vibecoding a production-grade multi-protocol native email client across iOS and macOS is a massive engineering trap.

Building a functional email client requires implementing robust IMAP parsers, OAuth flows for Gmail and Microsoft, local encryption, and complex native UI list virtualization. While AI coding agents can quickly scaffold a SwiftUI layout or a prototype Node.js backend, dealing with raw email protocols, MIME decoding bugs, push notification daemons, and Apple Keychain credential management will consume hundreds of frustrating hours. The subscription price is cheap compared to the endless maintenance burden of keeping an email client alive across major OS updates.

### What you can't replicate

- Decade-long refinement of IMAP edge-case handling and obscure server quirks
- Seamless native OS integrations like Share Extensions, Shortcuts, and Watch complications across multiple device generations
- Production-grade stability preventing data loss on local email caches

## What it does

A feature-rich, highly customizable third-party email client built for Apple ecosystems with multi-account support, smart inbox, custom actions, and deep system integration.

### Core features

- Unified & Smart Inbox filtering out newsletters and clutter
- Multi-account management (Gmail, Exchange, iCloud, IMAP, POP3)
- Custom actions and workflow chaining with single swipe/click
- Email snoozing and 'Send Later' scheduling
- Local security with Face ID / Touch ID locking
- Deep Apple ecosystem integration (Share Sheet, Siri Shortcuts, Widgets)

## The business

### Pricing

- Free: Free
- Airmail Pro Monthly: $7.99/mo
- Airmail Pro Yearly: $49.99/yr

Founded 2013.
Team size: 10-20.

## The hard parts

- IMAP IDLE push synchronization and complex OAuth token lifecycles across multiple providers
- Native macOS and iOS view performance with local SQLite message caching and virtualized lists
- Deep OS integration hooks like Share Extensions, AppleScript, and interactive notifications
- Handling edge-case SSL/TLS handshakes and MIME parser standards for corrupted email threads

## How to vibe code Airmail

### Prerequisites

- Mac: Required for macOS and iOS native application development
- Xcode (Free): Official IDE for building native Swift and SwiftUI apps
- Apple Developer Account ($99/yr): Required for provisioning profiles, push notifications, and hardware testing

### Recommended AI tools

- Claude Code: Best-in-class multi-file reasoning agent for handling complex Swift codebase architectures and debugging build errors
- Cursor: Excellent AI code editor for inspecting SwiftUI layout diffs and tweaking UI components

### Stack

- Frontend: Swift / SwiftUI (macOS & iOS native client)
- Backend: Local SQLite database via GRDB.swift with optional background sync daemon
- Database: Local SQLite
- Auth: Apple Keychain for credential and OAuth token storage
- Payments: RevenueCat / StoreKit 2 for in-app purchases
- Other: SwiftMail / MailCore for IMAP/SMTP parsing, EventKit for calendar actions

### Hosting

- Cloudflare (Hosting optional personal license/sync check endpoint if required): $0/mo

### Build guide

1. **Project Scaffolding & SwiftUI Navigation Split View** — Initialize a multiplatform SwiftUI application target supporting macOS and iOS, establishing a master-detail layout mimicking standard email client navigation.

```
Create a new multiplatform SwiftUI app structure targeting macOS and iOS. Implement a three-column NavigationSplitView consisting of a sidebar for accounts and folders, a message list view with virtualized rows displaying sender, subject, preview snippet, and timestamp, and a detail reading pane. Ensure the layout adapts correctly between compact iPhone screens and expansive Mac displays. Use mock data structures for email threads with properties such as id, sender, subject, body, date, isRead, and isStarred. Add basic view modifiers for dark mode support and custom accent colors matching user preferences.
```

2. **Local SQLite Database Layer with GRDB** — Integrate GRDB.swift to establish a local, encrypted SQLite database for offline email caching and thread storage.

```
Integrate GRDB.swift into the project via Swift Package Manager. Design a robust local database schema representing email accounts, folders, messages, and attachments. Create a persistence manager class that handles database migrations, thread-safe background writing queues, and reactive publishers for UI updates. Implement CRUD operations for storing fetched messages locally, ensuring fast full-text search indexing over subject and body fields using SQLite FTS5 extension tables. Include unit tests verifying thread retrieval performance and schema migration integrity.
```

3. **IMAP & SMTP Protocol Integration** — Implement core email fetching and sending functionality by integrating an IMAP/SMTP client library or Swift wrapper.

```
Incorporate an IMAP and SMTP handling library into the Swift project. Build an account configuration sheet supporting standard IMAP/SMTP server settings, port configurations, and OAuth2 authorization flows for Gmail and Microsoft Outlook. Implement background networking tasks to fetch folder lists, synchronize message headers using IMAP FETCH commands, and parse complex MIME multipart message bodies into clean HTML or plain text views. Handle connection timeouts, invalid SSL certificates gracefully, and credential securely storage inside the system Keychain.
```

4. **Smart Inbox Filtering & Rules Engine** — Build automated filters to separate newsletters, VIP messages, and custom user rules.

```
Develop a Smart Inbox classification and rules engine that processes incoming local messages. Implement algorithmic heuristics and user-defined rules to automatically categorize emails into 'Important', 'Newsletters', and 'Others' tabs by analyzing headers, sender domains, and mailing list tags. Build an interface in settings allowing users to create custom automation rules (e.g., if sender matches X, apply label Y and archive). Ensure these rules execute locally immediately upon message synchronization and persist state changes to the SQLite database.
```

5. **Custom Actions & Swipe Gestures** — Implement configurable swipe actions and multi-step workflow custom actions.

```
Implement customizable swipe actions for message rows supporting leading and trailing configurations (e.g., swipe right to archive, swipe left to snooze). Build a custom action workflow builder UI where users can chain multiple operations together—such as adding a tag, moving to a folder, sending an API payload to Todoist via URL scheme, and archiving the thread in a single click. Ensure these custom action scripts execute sequentially with error handling and rollback mechanisms if any intermediate step fails.
```

6. **Privacy Mode & Biometric App Locking** — Add remote image blocking, tracking pixel suppression, and Face ID / Touch ID security layers.

```
Implement a Privacy Mode toggle that intercepts outgoing web view requests inside message bodies to block remote tracking pixels and prevent automatic loading of remote images unless explicitly requested by the user. Integrate LocalAuthentication framework to protect the entire application with Face ID or Touch ID upon launch or background resumption. Ensure app content is automatically blurred or hidden when switching to the system app switcher to prevent sensitive email preview leaks.
```

7. **StoreKit 2 Integration & Polish** — Set up in-app purchases using StoreKit 2 to handle feature gates for multi-account support and pro utilities.

```
Implement StoreKit 2 subscription management to handle Airmail Pro feature gating. Create a paywall view presenting monthly and annual subscription options. Set up asynchronous transaction listeners to verify receipt validity, manage subscription status caching securely in UserDefaults or Keychain, and unlock multi-account management, smart inbox filters, and advanced agenda integrations dynamically when active entitlements are detected. Add smooth macOS/iOS transition animations and comprehensive keyboard shortcut navigation for iPad and Mac.
```

### Cost vs paying

**Starting costs (one-time):**

- Apple Developer Account: $99/yr
- AI Coding Subscriptions: $40
- Total: ~$139 one-time

**Ongoing costs (monthly):**

- Local execution (no server hosting): $0/mo
- Total: $0/mo

- Paying for the SaaS instead: $7.99/mo
- Build time: 120-160 hours
- AI tool credits: $40
- Break-even: 18 months

## Sources

- [Airmail Official Website](https://airmailapp.com)
- [Wikipedia - Airmail (email client)](https://en.wikipedia.org/wiki/Airmail_(email_client))