Communicationv0.1.4
@tekir/mail
Email with SMTP, Sevk, Resend, Mailgun, and SES transports.
Installation
$
bun add @tekir/mailFeatures
- Fluent MailBuilder: to/cc/bcc/subject/html/text/attach
- Multiple transports: SMTP, Sevk, Resend, Mailgun, SES
- Log and Fake transports for dev and testing
- BaseMail class for reusable mail templates
- MailProvider for DI registration
Quick Example
TypeScript
import { Mail } from '@tekir/mail'
const mail = new Mail({ default: 'smtp', transports: { smtp: smtpConfig } })
await mail.use('smtp')
.to('[email protected]')
.subject('Welcome!')
.html('<h1>Hello</h1>')
.send()Changelog
v0.1.4LatestSeptember 16, 2026
- Published output now uses the shared Node-targeted ESM bundle pipeline with external dependencies and generated TypeScript declarations, while Bun consumers keep the native source export.
v0.1.3July 23, 2026
- Package metadata now follows the shared compatible
0.1.xdependency range used by this coordinated Tekir release.
v0.1.2July 16, 2026
- Resend and Sevk transports normalize trailing slashes in custom API base URLs, preventing malformed double-slash endpoints.
v0.1.1June 13, 2026
- Every message is now sanitized for header injection before it reaches a transport.
from/to/cc/bcc/replyTo/subject, custom headers, and attachment filenames are stripped ofCR/LF, including for messages dispatched directly or via the notification mail channel that previously bypassed the builder. - SMTP now enforces TLS.
requireTLSdefaults totrueon non-secure connections (STARTTLS required) andtlsdefaults to verifying the certificate (rejectUnauthorized: true), with optionalca/servername. - The log transport now redacts by default (
LogConfig.redact, defaulttrue): addresses are masked, the body is never logged, and non-pretty mode writes only metadata. Setredact: falseto opt back into full content. - Provider error bodies returned to the caller are truncated, and the SES transport's signing date and canonical query are now deterministic and RFC-3986 correct.
- Found and fixed with Fable.
v0.1.0April 1, 2026
- Initial release