Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
with:
enable_windows_checks : false
linux_build_command: "swift test --parallel --enable-code-coverage"
linux_exclude_swift_versions: "[{\"swift_version\": \"5.8\"}, {\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"nightly\"}, {\"swift_version\": \"nightly-main\"}, {\"swift_version\": \"nightly-6.0\"}, {\"swift_version\": \"nightly-6.1\"}, {\"swift_version\": \"nightly-6.3\"}]"
linux_exclude_swift_versions: "[{\"swift_version\": \"5.8\"}, {\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"nightly\"}, {\"swift_version\": \"nightly-main\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"nightly-6.0\"}, {\"swift_version\": \"nightly-6.1\"}, {\"swift_version\": \"nightly-6.3\"}]"
4 changes: 1 addition & 3 deletions .swiftformatignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
Package.swift
Package@swift-6.0.swift
Package@swift-6.1.swift
Package.swift
1 change: 1 addition & 0 deletions .unacceptablelanguageignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sources/FeatherMail/Models/Address.swift
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (c) 2018-2022 Tibor Bödecs
Copyright (c) 2022-2026 Binary Birds Ltd.
Copyright (c) 2022-2026 Binary Birds Kft.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ test:
swift test --parallel

docker-test:
docker build -t tests . -f ./Docker/Dockerfile.testing && docker run --rm tests
docker build -t tests . -f ./docker/tests/Dockerfile && docker run --rm tests

2 changes: 1 addition & 1 deletion Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 23 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,46 +1,52 @@
// swift-tools-version:6.2
// swift-tools-version:6.1
import PackageDescription

let defaultSwiftSettings: [SwiftSetting] = [
// NOTE: https://github.com/swift-server/swift-http-server/blob/main/Package.swift
var defaultSwiftSettings: [SwiftSetting] = [

// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0441-formalize-language-mode-terminology.md
.swiftLanguageMode(.v6),
.enableExperimentalFeature(
"AvailabilityMacro=FeatherMailAvailability:macOS 13, iOS 16, watchOS 9, tvOS 16, visionOS 1"
),
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
.enableUpcomingFeature("MemberImportVisibility"),
// https://forums.swift.org/t/experimental-support-for-lifetime-dependencies-in-swift-6-2-and-beyond/78638
.enableExperimentalFeature("Lifetimes"),
// https://github.com/swiftlang/swift/pull/65218
.enableExperimentalFeature("AvailabilityMacro=FeatherMailAvailability:macOS 15, iOS 18, watchOS 9, tvOS 11, visionOS 2"),
]

#if compiler(>=6.2)
defaultSwiftSettings.append(
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md
.enableUpcomingFeature("NonisolatedNonsendingByDefault")
)
#endif

let package = Package(
name: "feather-mail",

products: [
.library(name: "FeatherMail", targets: ["FeatherMail"]),
.library(name: "FeatherMailTesting", targets: ["FeatherMailTesting"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-log", from: "1.8.0"),
// [docc-plugin-placeholder]
.package(url: "https://github.com/apple/swift-log", from: "1.6.0"),
],

targets: [
.target(
name: "FeatherMail",
dependencies: [
.product(name: "Logging", package: "swift-log"),
]
),
.target(
name: "FeatherMailTesting",
.testTarget(
name: "FeatherMailTests",
dependencies: [
.target(name: "FeatherMail"),
],
resources: [
.copy("Assets/feather.png")
]
),
.testTarget(
name: "FeatherMailTests",
dependencies: [
.target(name: "FeatherMailTesting"),
]
),
]
],

)
47 changes: 0 additions & 47 deletions Package@swift-6.0.swift

This file was deleted.

47 changes: 0 additions & 47 deletions Package@swift-6.1.swift

This file was deleted.

87 changes: 57 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,76 @@

An abstract mail component for Feather CMS.

## Getting started
[
![Release: 1.0.0-beta.1](https://img.shields.io/badge/Release-1%2E0%2E0--beta%2E1-F05138)
](
https://github.com/feather-framework/feather-mail/releases/tag/1.0.0-beta.1
)

## Features

- Immutable mail payload model
- Validation helpers and errors
- Raw MIME encoder for transport providers
- Attachments and HTML support

## Requirements

⚠️ This repository is a work in progress, things can break until it reaches v1.0.0.
![Swift 6.1+](https://img.shields.io/badge/Swift-6%2E1%2B-F05138)
![Platforms: macOS, iOS, tvOS, watchOS, visionOS](https://img.shields.io/badge/Platforms-macOS_%7C_iOS_%7C_tvOS_%7C_watchOS_%7C_visionOS-F05138)

Use at your own risk.
- Swift 6.1+
- Platforms:
- macOS 15+
- iOS 18+
- tvOS 18+
- watchOS 11+
- visionOS 2+

### Adding the dependency
## Installation

To add a dependency on the package, declare it in your `Package.swift`:
Use Swift Package Manager; add the dependency to your `Package.swift` file:

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

and to your application target, add `FeatherMail` to your dependencies:
Then add `FeatherMail` to your target dependencies:

```swift
.product(name: "FeatherMail", package: "feather-mail")
.product(name: "FeatherMail", package: "feather-mail"),
```

Example `Package.swift` file with `FeatherMail` as a dependency:
## Usage

```swift
// swift-tools-version:6.2
import PackageDescription

let package = Package(
name: "my-application",
dependencies: [
.package(url: "https://github.com/feather-framework/feather-mail", .upToNextMinor(from: "0.6.0")),
],
targets: [
.target(name: "MyApplication", dependencies: [
.product(name: "FeatherMail", package: "feather-mail")
]),
.testTarget(name: "MyApplicationTests", dependencies: [
.target(name: "MyApplication"),
]),
]
[
![DocC API documentation](https://img.shields.io/badge/DocC-API_documentation-F05138)
](
https://feather-framework.github.io/feather-mail/
)
```

### 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.

## Mail drivers

The following mail driver implementations are available for use:

- [SES Driver](https://github.com/feather-framework/feather-mail-driver-ses)
- [SMTP Driver](https://github.com/feather-framework/feather-mail-driver-smtp)
- [Memory Driver](https://github.com/feather-framework/feather-memory-mail)

## Development

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

## Contributing

The official API reference for this project is available at:
[https://feather-framework.github.io/feather-mail/documentation/](https://feather-framework.github.io/feather-mail/documentation/)
[Pull requests](https://github.com/feather-framework/feather-mail/pulls) are welcome. Please keep changes focused and include tests for new logic.
Loading