Skip to content

In-memory mail client for Feather Mail, designed for tests and local development.

License

Notifications You must be signed in to change notification settings

feather-framework/feather-memory-mail

Repository files navigation

Feather Memory Mail

In-memory mail client for Feather Mail, designed for tests and local development. It mirrors the behavior of real mail transports (SMTP, SES) without performing any network operations.

Release: 1.0.0-beta.1

Features

  • In-memory mailbox with insertion-order storage
  • Validates mail before storage
  • Supports plain text, HTML, and attachments
  • No network dependencies

Requirements

Swift 6.1+ Platforms: Linux, macOS, iOS, tvOS, watchOS, visionOS

  • Swift 6.1+
  • Platforms:
    • Linux
    • macOS 15+
    • iOS 18+
    • tvOS 18+
    • watchOS 11+
    • visionOS 2+

Installation

Use Swift Package Manager; add the dependency to your Package.swift file:

.package(url: "https://github.com/feather-framework/feather-memory-mail", exact: from: "1.0.0-beta.1"),

Then add FeatherMemoryMail to your target dependencies:

.product(name: "FeatherMemoryMail", package: "feather-memory-mail"),

Usage

DocC API documentation

API documentation is available at the following link.

Warning

This repository is a work in progress, things can break until it reaches v1.0.0.

Example

let client = MemoryMailClient()

let mail = Mail(
    from: .init("from@example.com"),
    to: [.init("to@example.com")],
    subject: "Hello",
    body: .plainText("Body")
)

try await client.send(mail)

let mailbox = await client.getMailbox()

Related repositories

Development

  • Build: swift build
  • Test:
    • local: make test
    • using Docker: make docker-test
  • Format: make format
  • Check: make check

Contributing

Pull requests are welcome. Please keep changes focused and include tests for new logic.

About

In-memory mail client for Feather Mail, designed for tests and local development.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •