mailpit-testing
Use Mailpit to test emails in local development. Understand email verification workflows and inspect outgoing emails without external services.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Mailpit Local Email Testing
このスキルは、Bingifyプロジェクトでのメール機能のローカル開発・テストをカバーします。
概要
BingifyはMailpitを使用して、ローカル開発環境でメール送信のテストを行います。
Mailpit WebUIへのアクセス
http://localhost:54324
Mailpit WebUIでは、送信されたすべてのメールを確認できます。
メール送信関数
import { sendEmail } from "@/lib/mail";
export async function sendWelcomeEmail(email: string) {
const result = await sendEmail({
to: email,
subject: "Welcome to Bingify",
html: "<h1>Welcome!</h1>",
});
return result;
}
ServerActionsでのメール送信
"use server";
import { sendEmail } from "@/lib/mail";
export async function submitContactForm(data: unknown) {
const validData = contactFormSchema.parse(data);
// お問い合わせ確認メール
await sendEmail({
to: validData.email,
subject: "お問い合わせありがとうございます",
html: `<p>メッセージを受け取りました。</p>`,
});
return { success: true };
}
Mailpit REST API
メール情報の取得:
curl http://localhost:54324/api/v1/messages
メールをクリア
curl -X DELETE http://localhost:54324/api/v1/messages
参考
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!