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.

manifest.json3.6 KBRaw
{
  "manifestVersion": 1,
  "name": "@toolpal/email-send",
  "version": "1.0",
  "description": "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.",
  "license": "MIT",
  "keywords": [
    "email",
    "smtp",
    "resend",
    "notification",
    "workflow",
    "delivery"
  ],
  "entry": "dist/tool.mjs",
  "sdk": "0.1.0",
  "engines": {
    "node": ">=22.15.0"
  },
  "inputSchema": {
    "type": "object",
    "required": [
      "to",
      "subject"
    ],
    "properties": {
      "to": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 3,
            "maxLength": 320
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 320
            },
            "minItems": 1,
            "maxItems": 50
          }
        ]
      },
      "subject": {
        "type": "string",
        "minLength": 1,
        "maxLength": 998
      },
      "text": {
        "type": "string",
        "maxLength": 500000,
        "description": "Plain-text email body"
      },
      "html": {
        "type": "string",
        "maxLength": 500000,
        "description": "HTML email body"
      },
      "from": {
        "type": "string",
        "maxLength": 320,
        "description": "Sender address, e.g. \"Ops <[email protected]>\"; defaults to EMAIL_FROM"
      },
      "cc": {
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 3,
          "maxLength": 320
        },
        "maxItems": 50
      },
      "bcc": {
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 3,
          "maxLength": 320
        },
        "maxItems": 50
      },
      "replyTo": {
        "type": "string",
        "minLength": 3,
        "maxLength": 320
      },
      "files": {
        "type": "array",
        "items": {
          "type": "string",
          "description": "File attachments (10 MB total max)",
          "x-toolpal-file": true
        },
        "maxItems": 10
      },
      "provider": {
        "anyOf": [
          {
            "type": "string",
            "const": "auto"
          },
          {
            "type": "string",
            "const": "resend"
          },
          {
            "type": "string",
            "const": "smtp"
          }
        ],
        "description": "Delivery backend; auto (default) uses RESEND_API_KEY if set, else SMTP_URL"
      }
    }
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "provider",
      "messageId",
      "from",
      "recipients",
      "attachments"
    ],
    "properties": {
      "provider": {
        "anyOf": [
          {
            "type": "string",
            "const": "resend"
          },
          {
            "type": "string",
            "const": "smtp"
          }
        ]
      },
      "messageId": {
        "type": "string"
      },
      "from": {
        "type": "string"
      },
      "recipients": {
        "type": "integer"
      },
      "attachments": {
        "type": "integer"
      }
    }
  },
  "permissions": {
    "net": true,
    "env": [
      "EMAIL_FROM",
      "RESEND_API_KEY",
      "SMTP_URL"
    ],
    "tmp": true
  },
  "limits": {
    "timeoutMs": 30000,
    "memoryMb": 128
  },
  "build": {
    "toolpal": "0.1.0",
    "esbuild": "0.28.2",
    "options": "sha256-tMpkndD8HsDUvZadrPbEAMGGIGK7nvmTGxMMlUxy9Fo="
  }
}