Home/Tools/@tpmjs/tools-postmark

validateTemplate

@tpmjs/tools-postmark

Validate template content and model.

Official
ops
v0.2.1
MIT

Interactive Playground

Test @tpmjs/tools-postmark (validateTemplate) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-postmark
pnpm add @tpmjs/tools-postmark
yarn add @tpmjs/tools-postmark
bun add @tpmjs/tools-postmark
deno add npm:@tpmjs/tools-postmark

2. Import the tool

import { validateTemplate } from '@tpmjs/tools-postmark';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { validateTemplate } from '@tpmjs/tools-postmark';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { validateTemplate },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(Subject?: string, HtmlBody?: string, TextBody?: string, TemplateType?: string, LayoutTemplate?: string, TestRenderModel?: Record<string, unknown>, InlineCssForHtmlTestRender?: boolean) => Promise<unknown>

Tags

agent
content
email
model
ops
postmark
smtp
template
tpmjs
transactional
validate

Parameters

Available configuration options

Auto-extracted
Subject
Optional
Type: string

Subject line to validate.

HtmlBody
Optional
Type: string

HTML body to validate.

TextBody
Optional
Type: string

Text body to validate.

TestRenderModel
Optional
Type: object

Model data for test rendering.

InlineCssForHtmlTestRender
Optional
Type: boolean

Inline CSS in test render.

TemplateType
Optional
Type: string

LayoutTemplate
Optional
Type: string

Schema extracted: 3/1/2026, 4:26:16 AM

README

ERROR: No README data found!

Statistics

Downloads/month

178

GitHub Stars

14

Quality Score

89%

Bundle Size

NPM Keywords

tpmjs
postmark
email
transactional
smtp
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai