utobo-email
v1.0.1
Published
Official Node.js SDK for the utobo email Email Platform
Maintainers
Readme
utobo-email
Official Node.js SDK for utobo email — send transactional emails via a clean REST API with first-class TypeScript support.
Install
npm install utobo-email
# or: yarn add utobo-email / pnpm add utobo-emailRequires Node.js 18+.
Quickstart
import { UtoboEmail } from "utobo-email";
const client = new UtoboEmail("av_live_your_api_key");
const { data, error } = await client.emails.send({
from: "You <[email protected]>",
to: "[email protected]",
subject: "Welcome",
html: "<p>Your account is ready.</p>",
});Every method returns { data, error } — check error before using data.
Authentication
Pass your API key to the constructor, or set the UTOBO_EMAIL_API_KEY environment variable
and construct the client with no arguments:
// Reads process.env.UTOBO_EMAIL_API_KEY
const client = new UtoboEmail();Configuration
const client = new UtoboEmail(process.env.UTOBO_EMAIL_API_KEY, {
baseUrl: "https://qhxsmabxmwcxqqgcbhxe.supabase.co/functions/v1", // default
});| Option | Env var | Default |
| ----------- | ----------------------- | ---------------------------------- |
| key | UTOBO_EMAIL_API_KEY | — |
| baseUrl | UTOBO_EMAIL_BASE_URL | https://qhxsmabxmwcxqqgcbhxe.supabase.co/functions/v1 |
Sending email
client.emails.send(options) accepts:
from— sender,"Name <email>"format supportedto— recipient string or arraysubjecthtmland/ortextreact— a React element (requires the optional@react-email/renderpeer dependency)reply_to,cc,bcc,attachments,headers
Retrieve a sent email by ID:
const { data } = await client.emails.get("<email-id>");Links
- Docs: https://utobo.com/email/docs
- Dashboard & API keys: https://utobo.com/email/pricing
License
MIT
