No description
- Swift 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| ReallySimpleEmail | ||
| ReallySimpleEmail.xcodeproj | ||
| Tools | ||
| README.md | ||
ReallySimpleEmail
A deliberately minimal, read-only IMAP client for iOS. No dependencies - the
IMAP client is ~240 lines of Network.framework on top of TLS.
What it does
- One or more IMAP accounts (implicit TLS, usually port 993).
- First sync of an account pulls the last 30 days; every sync after that keeps that same start date, so nothing you have already synced disappears.
- Messages are stored locally (SwiftData) with their plain text body, so reading works offline.
- Seen state is local only. Swipe a row either direction to toggle it.
What it deliberately cannot do
There is no code path that writes to a mail server:
IMAPConnection.execute(_:)checks every command against an allowlist (CAPABILITY, NOOP, LOGIN, LOGOUT, EXAMINE, LIST, STATUS, SEARCH, FETCH, ID, plusUID SEARCH/UID FETCH). Anything else throws before a byte is sent.- Mailboxes are opened with
EXAMINE, notSELECT- the server itself grants the session no write permission. - Bodies are fetched with
BODY.PEEK[], which does not set\Seen.
So the server never learns what you read, and nothing can be deleted, moved or flagged from this app.
Layout
Mail/
IMAPConnection.swift TLS socket, tagged commands, literal-aware reader, allowlist
IMAPClient.swift login / examine / uid search / uid fetch, envelope parsing
IMAPParser.swift tokeniser for atoms, quoted strings, NIL, nested lists
MIME.swift RFC 2047 headers, quoted-printable, base64, charsets, multipart
MailSync.swift drives a sync into SwiftData
Keychain.swift passwords (never stored in the database)
Models/ MailAccount, MailMessage
Views/ mailbox list, message detail, account management
Notes / limits
- TLS on connect only; no STARTTLS on port 143, no OAuth.
- Only the first 64 KB of a message is downloaded (
MailSync.maxBodyBytes); attachments are ignored, HTML is flattened to text. - Sync is manual: pull to refresh, or the toolbar button.
App icon
Tools/GenerateAppIcon.swift draws the icon (a little envelope with a face) with
CoreGraphics and writes the light, dark and tinted 1024x1024 PNGs straight into
the asset catalog:
xcrun swift Tools/GenerateAppIcon.swift ReallySimpleEmail/Assets.xcassets/AppIcon.appiconset