MCP HubMCP Hub
SKILL·84CEC4

using-email-templates

mailtrap
更新日 27 days ago
6 閲覧
9
1
9
GitHubで表示
メタaiapidesign

について

このスキルは、開発者がMailtrapでホストされたテンプレートを使用してメールを送信できるようにし、メールデザインとアプリケーションコードを分離します。APIペイロードでのテンプレートUUIDの使用方法や、トランザクションメールまたは一括送信のためのHandlebars変数を用いたコンテンツのパーソナライズについて説明しています。これらのテンプレート化されたメールの作成、送信、またはデバッグが必要な場合にご利用ください。

クイックインストール

Claude Code

推奨
メイン
npx skills add mailtrap/mailtrap-skills -a claude-code
プラグインコマンド代替
/plugin add https://github.com/mailtrap/mailtrap-skills
Git クローン代替
git clone https://github.com/mailtrap/mailtrap-skills.git ~/.claude/skills/using-email-templates

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Using Mailtrap email templates

Overview

Templates are edited in the Mailtrap UI, referenced by UUID from your app, and filled with Handlebars data at send time. The same template can be used with transactional and bulk (promotional) streams; pick the stream when you integrate.

Before generating SDK code: read the README of the relevant SDK repository linked below for current method signatures. Do not rely on memory.

Before generating API request bodies: use the official docs and examples below—request shapes belong in the API reference, not in guesses (including when using AI-assisted coding).

Template management via API (create/update/list outside the UI): Templates API.

Related skills: authorizing-api-requests (tokens, env vars, auth headers), sending-emails (bases and streams), testing-with-sandbox (preview sends without live delivery).

When to use

  • When sending or testing emails with Mailtrap-hosted templates (UUID in the send payload)
  • Creating or editing templates in the UI
  • Templates CRUD via Templates API (automations, provisioning)
  • API body using template_uuid and template_variables
  • Handlebars conditionals, loops, escaped vs unescaped HTML

Quick reference

API operations

In the developer docs, open:

Request body variant is typically EmailFromTemplate in the interactive reference.

Authorization

Send with Authorization: Bearer $MAILTRAP_API_TOKEN on the matching stream host (send.api.mailtrap.io or bulk.api.mailtrap.io). Token scope, storage, and the alternative Api-Token header are covered in skill authorizing-api-requests.

Example (curl) — template send

curl -X POST https://send.api.mailtrap.io/api/send \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": {"email": "[email protected]", "name": "Your App"},
    "to": [{"email": "[email protected]"}],
    "template_uuid": "your-uuid",
    "template_variables": {"user_name": "Jane"}
  }'

Payload shape

Replace literal text/html with template fields, for example:

  • template_uuid (from the template Integration tab)
  • template_variables (object whose keys match Handlebars variables)

Exact required fields (e.g. from, to) follow the same rules as non-template sends for that stream.

Handlebars (supported patterns)

  • {{name}} — escaped output; {{{html}}} — raw HTML
  • {{#if}} / {{#unless}}, {{#each}}, {{#with}}
  • Nested paths such as {{order.id}}
  • Falsy values that suppress blocks include empty string, 0, false, empty collections (see product docs)

Full syntax and examples: Using Handlebars with Email Templates. Testing workflow: Testing templates with Handlebars. Sandbox preview sends: Send test emails (sandbox).

Where templates live

Templates in the app sidebar. UUID and stream-specific integration snippets are under each template's Integration tab.

Generating template HTML

Proactively offer to generate the template HTML when the user is creating a new template — don't wait to be asked. The output must be a real email template — not arbitrary web HTML — and must be mobile-compatible (responsive, renders well across email clients and screen sizes).

SDKs

Common mistakes

MistakeFix
Mixing text/html with template_uuidUse template fields per API schema for template sends
Skipping sandbox for risky changesPreview with sandbox sending / Testing API (see testing-with-sandbox and send test emails)

GitHub リポジトリ

mailtrap/mailtrap-skills
パス: skills/using-email-templates
0
FAQ

よくある質問

using-email-templates Skillとは何ですか?

using-email-templates はmailtrap が作成した Claude Skillです。Skillは、Claudeが必要に応じて読み込む指示とリソースをまとめ、追加の指示なしで using-email-templates に関連するタスクを実行できるようにします。

using-email-templates をインストールするには?

このページのインストールコマンドを使用してください。using-email-templates をプラグインとして Claude Code に追加するか、リポジトリを skills ディレクトリにクローンし、Claudeを再起動してSkillを読み込みます。

using-email-templates はどのカテゴリに属しますか?

using-email-templates は メタ カテゴリに属します。

using-email-templates は無料で利用できますか?

はい。using-email-templates は AIMCP に掲載されており、無料でインストールできます。

関連スキル

content-collections
メタ

このスキルは、Content Collections(Markdown/MDXファイルを型安全なデータコレクションに変換するTypeScriptファーストのツール)の本番環境でテストされた設定を提供します。Zodバリデーションによる型安全性を実現し、ブログ、ドキュメントサイト、コンテンツ重視のVite + Reactアプリケーション構築時にご利用ください。Viteプラグインの設定、MDXコンパイルから、デプロイ最適化、スキーマバリデーションまで、すべてを網羅しています。

スキルを見る
polymarket
メタ

このスキルは、開発者がPolymarket予測市場プラットフォームを活用したアプリケーション構築を可能にします。API統合による取引や市場データの取得に加え、WebSocketを介したリアルタイムデータストリーミングにより、ライブ取引や市場活動を監視できます。取引戦略の実装や、ライブ市場更新を処理するツールの作成にご利用ください。

スキルを見る
creating-opencode-plugins
メタ

このスキルは、開発者がコマンド、ファイル、LSP操作など25種類以上のイベントタイプにフックするOpenCodeプラグインを作成することを支援します。JavaScript/TypeScriptモジュール向けに、プラグイン構造、イベントAPI仕様、および実装パターンを提供します。カスタムイベント駆動ロジックでOpenCode AIアシスタントのライフサイクルをインターセプト、監視、または拡張する必要がある場合にご利用ください。

スキルを見る
sglang
メタ

SGLangは、高性能なLLMサービングフレームワークであり、RadixAttentionプレフィックスキャッシュを活用したJSON、正規表現、エージェントワークフロー向けの高速で構造化された生成を特長とします。特にプレフィックスが繰り返されるタスクにおいて、大幅に高速な推論を実現し、複雑な構造化出力やマルチターン対話に最適です。制約付きデコードが必要な場合や、広範なプレフィックス共有を伴うアプリケーションを構築する場合は、vLLMなどの代替案ではなくSGLangを選択してください。

スキルを見る