REST API Reference
SDK Integrations
Integrate MailSend cleanly in your codebase using our lightweight client libraries.
Docs Summary
- What this page explains: Integrating client libraries for Node.js/TypeScript and Go.
- Who should use it: Software engineers writing backend code integrations.
- Related MailSend feature: Node.js and Go SDK wrappers
- Common use cases: Programmatic notifications, backend alerts
- Related docs: Email API, Webhooks, Introduction
We support drop-in SDKs for popular runtimes and packages. Keep your API keys safe by storing them in environment variables (`MAILSEND_API_KEY`).
javascript
import { MailSend } from '@mailsend/node';
const client = new MailSend({ apiKey: process.env.MAILSEND_API_KEY });
await client.emails.send({
from: 'Acme <hello@acme.com>',
to: ['customer@gmail.com'],
subject: 'Order Confirmation #9401',
html: '<p>Your order is on the way!</p>'
});go
package main
import (
"context"
"github.com/mailsend/mailsend-go"
)
func main() {
client := mailsend.NewClient("ms_live_abc123")
params := &mailsend.SendEmailParams{
From: "hello@acme.com",
To: []string{"customer@gmail.com"},
Subject: "Go SDK Confirm",
Html: "<strong>Sent using Go!</strong>",
}
_, err := client.Emails.Send(context.Background(), params)
if err != nil {
panic(err)
}
}