Skip to main content
Glama

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
NameRequiredDescriptionDefault
campaign_idYes
test_emailsYes

Implementation Reference

  • 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.",
        })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AlexlaGuardia/mcp-mailchimp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server