本文へスキップ
Skillpedia
APIとサーバー(バックエンド)48k · #5136

mailtrap-testing-with-sandbox

できること

このツールを使うと、実際の受信者に届くことなくテストメールを送信できます。送信したメールが正しく送られているかを確認するための、テスト用の受信箱のようなものです。

使う場面

  • ✓ウェブサイトやアプリを開発していて、送信メールをテストしたいとき。
  • ✓お客様に送信する前に、メールの見た目や内容を確認したいとき。
  • ✓メールが期待どおりに機能するかを確認する自動テストを行うとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mailtrap-testing-with-sandbox/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mailtrap-testing-with-sandbox/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Mailtrapのテスト用受信箱にテストメールを送信するように設定してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

システムが、実際の受信者のアドレスではなく、Mailtrap専用のアドレスにメールを送るように設定します。こうすることで、メールはMailtrap内に保存され、あなたが内容を確認できるようになります。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Testing with Mailtrap Email Sandbox

Overview

Email Sandbox captures mail in sandboxes (test inboxes)—a test environment where messages are not delivered to real recipients. You can send to sandboxes using our SDKs, HTTP API, or SMTP, depending on your needs.

Before generating SDK code: read the README of the relevant SDK repository (see mailtrap-sending-emails) for current sandbox mode options, inbox id, and constructor flags. Do not rely on memory.

Related skills: mailtrap-sending-emails (live sending hosts and streams).

When to use

  • You want no real delivery: dev, staging, CI, or demos where mail must stay in a test inbox.
  • You need to inspect what was sent: bodies, headers, attachments, or basic checks (e.g. spam report) via Sandbox / Testing API or the UI.
  • You are automating tests against captured mail.
  • You will only change SMTP settings so an existing app sends into a sandbox—no need for a framework-by-framework tutorial from this skill.

When not to use

  • Live sends to real recipients (mailtrap-sending-emails).
  • For full framework setup guides or detailed API references, link users to Mailtrap's Integration tab for SMTP/API details and the API docs for specifics—don't cover every framework or API field here.

Quick reference

API base

Service Send mail URL Auth header examples
Email Testing API (REST) https://sandbox.api.mailtrap.io/api/send/{inbox_id} Authorization: Bearer $MAILTRAP_SANDBOX_API_TOKEN

Tokens and account_id

Sandbox uses a separate token ($MAILTRAP_SANDBOX_API_TOKEN, Testing/Sandbox scope) — never reuse the live $MAILTRAP_API_TOKEN. The account_id in the example endpoints below is resolved at runtime via GET https://mailtrap.io/api/accounts. Store tokens in environment variables or a secrets manager.

When to use API vs SMTP

Use SMTP when testing apps that already send mail via SMTP (just update the host, port, and credentials). Use the HTTP API when building new integrations or your app can make HTTP requests; it's better for programmatic testing and automation.

SMTP settings (sandbox)

Setting Value
Host sandbox.smtp.mailtrap.io
Ports 2525 (default), 25, 465 (SSL), 587
Username / Password Per sandbox credentials from the Integration tab in the Mailtrap UI

Never use sandbox credentials or endpoints in production. Messages will only be captured in the sandbox, not delivered.

Key parameters

  • Inbox ID: Every sandbox (test inbox) has a unique inbox id, visible in the UI URL and needed for sending or REST API operations.
  • Token scope: Use a token with permissions for the relevant project and test inbox.

Typical use cases

  • Capture all outbound mail in dev, test, or staging (no real recipients).
  • View, validate, and assert message headers, bodies, HTML, attachments, or spam score.
  • Run integration or CI checks that read from the Email Sandbox API.
  • Test Mailtrap templates by pointing API or SDK/SMTP at sandbox.api.mailtrap.io / sandbox.smtp.mailtrap.io with a valid inbox id.

Example API paths

Use API docs for details, but typical endpoints include:

Operation URL Reference
List sandboxes GET https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/inboxes Sandboxes API

…

よくある質問

Mailtrapのアカウントは必要ですか?

はい、テスト用受信箱を使うにはMailtrapのアカウントが必要です。

これを使って実際の人にメールを送ることはできますか?

いいえ、このツールはテスト専用です。メールは実際の受信者には届きません。

テストのために送信されたメールはどこで確認できますか?

Mailtrapの画面上で直接確認できます。メールはそこに保存されています。

詳細

作者による元の説明

Capture outbound email in Mailtrap Email Sandbox for development, staging, CI, HTML inspection, spam checks, and fake inbox tests.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5136
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル