Asynchronous Nim π client for interacting with the MailerSend API
nimble install mailersend
- Intuitive API interface
- Direct to object serialization via
pkg/jsony
- Written in Nim π
import pkg/mailersend
var
mls = initMailersend(getEnv("api_key"))
mail = newEmail()
mail.setSubject("Hello, this is a test")
.setFrom("Example.com", "noreply@example.com")
.setTo("JoΓ«l Chibuzo", "joel.chibuzo@test.com")
.setText("This is a text/plain message")
.setHtml("This is a <strong>text/html</strong> message")
let x: XHeaders = waitFor mls.send(mail)
echo x # (id: "660appx0cc4cf5d1c00xb113", paused: false)
# check current quota
let q = waitFor mls.getQuota()
echo q.remaining # 99
- π Found a bug? Create a new Issue
- π Wanna help? Fork it!
- π Get β¬20 in cloud credits from Hetzner
- π₯° Donate via PayPal address
MIT license. Made by Humans from OpenPeeps.
Copyright Β© 2024 OpenPeeps & Contributors β All rights reserved.