openpeeps / mailersend-nim

The unofficial MailerSend Nim SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Asynchronous Nim πŸ‘‘ client for interacting with the MailerSend API

nimble install mailersend

API reference
Github Actions Github Actions

😍 Key Features

  • Intuitive API interface
  • Direct to object serialization via pkg/jsony
  • Written in Nim πŸ‘‘

Examples

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

❀ Contributions & Support

🎩 License

MIT license. Made by Humans from OpenPeeps.
Copyright Β© 2024 OpenPeeps & Contributors β€” All rights reserved.