← All packages

@lacspace/mailer

v1.2.1Mail Kit0 deps

A tiny zero-dependency SMTP client for Node — send email over raw net/tls with STARTTLS & AUTH, plus a fluent MIME builder (inline images, attachments, alternatives), RFC 5322 address + RFC 2047 helpers, batch send with retry, and no-network test transports. Provider presets (Hostinger, Gmail, Outlook, Zoho…) make setup one line.

npm i @lacspace/mailer

Usage

mailer.ts
import { createMailer, presets } from "@lacspace/mailer";

const mail = createMailer(
  presets.hostinger({ user: "no-reply@lacspace.com", pass: process.env.SMTP_PASS! }),
);

await mail.send({
  to: "customer@example.com",
  subject: "Welcome to Lacspace ✨",
  html: "<h1>You're in!</h1><p>Thanks for signing up.</p>",
  text: "You're in! Thanks for signing up.",
});

Exports 5

MailerSmtpErrorcreateMailermailerFromEnvpresets

Keywords

smtpemailmailersend-emailnodemailer-alternativehostinger

More in Mail Kit