mailpit-testing
Use Mailpit to test emails in local development. Understand email verification workflows and inspect outgoing emails without external services.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
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
参考
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!