Toolpal

@toolpal/email-send

public

v1.0published 1 download this weekMIT

Sends a plain-text or HTML email with optional file attachments via Resend (RESEND_API_KEY) or SMTP (SMTP_URL, supporting smtps:// and STARTTLS). Set EMAIL_FROM or pass `from` per call. Completes automated workflows alongside @toolpal/notify.

Network

Any host, including internal addresses. The code calls api.resend.com and builds other URLs at run time.

  • imports node:netsrc/index.ts · dist/tool.mjs:13
    import { createConnection } from "node:net";
  • imports node:tlssrc/index.ts · dist/tool.mjs:15
    import { connect as tlsConnect } from "node:tls";
  • uses fetchsrc/index.ts · dist/tool.mjs:4617
    const res = await fetch("https://api.resend.com/emails", {

Environment variables

EMAIL_FROM, RESEND_API_KEY, SMTP_URL

  • reads env EMAIL_FROMsrc/index.ts · dist/tool.mjs:4817
    const from = input.from ?? process.env.EMAIL_FROM;
  • reads env RESEND_API_KEYsrc/index.ts · dist/tool.mjs:4837
    const resendKey = process.env.RESEND_API_KEY;
  • reads env SMTP_URLsrc/index.ts · dist/tool.mjs:4838
    const smtpUrl = process.env.SMTP_URL;

Temporary files

A private temp directory per process

  • imports node:fssrc/index.ts · dist/tool.mjs:12
    import { readFileSync, statSync } from "node:fs";

Everything else is denied: other environment variables, files outside its package and temp directory, child processes, workers and native addons. Node's permission model enforces this, and it isn't a hard sandbox. Security model