BrevoKit is a Swift package used to communicate with the Brevo API for Server Side Swift Apps.
It implements the bare minimum to send an email.
## Setup
Add the dependency to Package.swift:
~~~~swift
dependencies: [
...
.package(url: "https://github.com/Impart/brevo-kit.git", from: "0.0.1")
],
targets: [
.target(name: "App", dependencies: [
.product(name: "BrevoKit", package: "brevo-kit"),
]),
~~~~
Register the config and the provider.
~~~~swift
let httpClient = HTTPClient(...)
let brevoClient = BrevoClient(httpClient: httpClient, apiKey: "YOUR_API_KEY")
~~~~
## Using the API
You can use all of the available parameters here to build your `BrevoKitEmail`
Usage in a route closure would be as followed:
~~~~swift
import BrevoKit
let email = BrevoTemplateEmail(...)
try await brevoClient.send(email)
~~~~
-
Notifications
You must be signed in to change notification settings - Fork 0
BrevoKit is a Swift package used to communicate with the Brevo API for Server Side Swift Apps.
License
Impart/brevo-kit
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
BrevoKit is a Swift package used to communicate with the Brevo API for Server Side Swift Apps.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published