send_test_email
Send test emails to verify campaign content and formatting before distribution. Specify up to 5 recipient addresses to preview how your email appears across different inboxes.
Instructions
Send a test email for a campaign. test_emails: comma-separated addresses (max 5).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ||
| test_emails | Yes |
Implementation Reference
- mcp_mailchimp/server.py:233-246 (handler)The send_test_email function is an MCP tool handler that takes campaign_id and test_emails, formats them, and sends a POST request to the Mailchimp API /campaigns/{campaign_id}/actions/test endpoint.
@mcp.tool() async def send_test_email(campaign_id: str, test_emails: str) -> str: """Send a test email for a campaign. test_emails: comma-separated addresses (max 5).""" mc = get_client() emails = [e.strip() for e in test_emails.split(",") if e.strip()] await mc.post( f"/campaigns/{campaign_id}/actions/test", json={"test_emails": emails[:5], "send_type": "html"}, ) return _fmt({ "campaign_id": campaign_id, "sent_to": emails[:5], "message": "Test email sent.", })