send_test_email
Send test emails for Mailchimp campaigns to verify content and formatting before launching to your full audience.
Instructions
Send a test email for a campaign before sending to the full audience.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | Campaign ID | |
| test_emails | Yes | Array of email addresses to send the test to | |
| send_type | No | Send as HTML or plaintext (default: html) |
Implementation Reference
- server.js:255-263 (handler)The handler function for the send_test_email tool that calls the mailchimp SDK.
async ({ campaign_id, test_emails, send_type }) => { await mailchimp.campaigns.sendTestEmail(campaign_id, { test_emails, send_type: send_type || "html", }); return { content: [{ type: "text", text: JSON.stringify({ success: true, sent_to: test_emails }, null, 2) }], }; } - server.js:247-264 (registration)Registration of the send_test_email tool using server.tool.
server.tool( "send_test_email", "Send a test email for a campaign before sending to the full audience.", { campaign_id: z.string().describe("Campaign ID"), test_emails: z.array(z.string()).describe("Array of email addresses to send the test to"), send_type: z.enum(["html", "plaintext"]).optional().describe("Send as HTML or plaintext (default: html)"), }, async ({ campaign_id, test_emails, send_type }) => { await mailchimp.campaigns.sendTestEmail(campaign_id, { test_emails, send_type: send_type || "html", }); return { content: [{ type: "text", text: JSON.stringify({ success: true, sent_to: test_emails }, null, 2) }], }; } );