@gofarther/mail
v0.2.0
Published
Send email through gofarther — your own verified domains, one API key.
Downloads
313
Maintainers
Readme
@gofarther/mail
Official Node SDK for the gofarther email API. Send from your own verified domains with one API key.
npm i @gofarther/mailimport { Gofarther } from '@gofarther/mail';
const gf = new Gofarther(process.env.GOFARTHER_API_KEY!);
await gf.emails.send({
from: '[email protected]',
to: '[email protected]',
subject: 'Hello',
html: '<p>Hi there 👋</p>',
});- cc / bcc / attachments / reply_to / idempotency_key — see
SendParams. - See what you've sent: any key can read back its own activity —
const emails = await gf.emails.list(); // last 100, newest first const one = await gf.emails.get(emails[0].id); // status + bounce info + body console.log(one.status); // sent | delivered | bounced | complained | failed - Test mode: a
gf_test_…key validates the request and returns atest_…id without sending — integrate before verifying a domain. - Domains:
gf.domains.add/verify/list/remove(needs afull-scope key). - Errors throw
GofartherErrorwith.status+.message.
Full reference: docs/API.md. Prefer SMTP? Point any client at
smtp.gofarther.dev:465, user gofarther, password = your API key.
