Email

Email quickstart

Send your first email with a test key before you set up a domain: nothing is delivered and nothing is charged.

Quickstart

With a test key you can send before setting up a domain: send from onboarding@test.honkio.ca to one of the test addresses below. Nothing is delivered and nothing is charged.

import { Honkio } from '@honkio/node'

const honkio = new Honkio(process.env.HONKIO_API_KEY)

const { data, error } = await honkio.emails.send({
  from: 'Acme <onboarding@test.honkio.ca>',
  to: 'delivered@test.honkio.ca',
  subject: 'Hello from HonkIO',
  html: '<p>It works.</p>',
})
if (error) console.error(error.name, error.message)
else console.log(data.id)

See the SDK reference for every resource, with examples.

Then add your own domain, switch to a live key, and send from an address on that domain.