Sending transactional email over raw SMTP with zero npm dependencies (Node only).
Overview
Send email over raw Node net/tls — STARTTLS, AUTH, MIME with attachments — with no npm dependencies. Provider presets make Hostinger, Gmail, Outlook, Zoho & more a one-liner. Node only.
Install
$ npm install @lacspace/mailer
Quick example
@lacspace/mailerts
createMailer(presets.hostinger({ user, pass })).send({ to, subject, html })
Returns { messageId, accepted }
Tips
`mailerFromEnv()` reads `SMTP_*` vars; presets exist for Hostinger, Gmail, Outlook, Zoho and more.
Compose bodies with @lacspace/email-templates for bulletproof, dark-mode-safe HTML.
Zero-dependency and isomorphic — safe to import on the server, in the browser, on the edge and in React Native. It tree-shakes, so you only ship what you import.
Watch out for
This is Node-only (uses `node:net`/`node:tls`), so it won't run on the edge runtime.