Summary
Enhance calendar-mcp email sending so callers can send proper multipart/alternative messages, especially plain text + HTML email bodies.
Problem
The current send_email behavior appears to support a single body value plus bodyFormat (text or html). That works only when the caller provides the exact content format matching bodyFormat.
This caused real formatting failures:
- A message sent with
bodyFormat: "html" but a plain-text/Markdown-style body arrived as an unformatted text blob because there was no actual HTML markup to render.
- A message sent with HTML markup but
bodyFormat: "text" arrived/rendered incorrectly because the content type did not match the body.
The corrected workaround is to send actual HTML and set bodyFormat: "html", but that is still not as robust as true multipart email.
Requested enhancement
Add explicit support for multipart email sending, ideally multipart/alternative, so callers can provide both:
- Plain-text fallback body
- HTML body
Possible API shape:
{
"accountId": "rockbotagent",
"to": ["recipient@example.com"],
"cc": [],
"subject": "Subject here",
"bodyFormat": "multipart",
"textBody": "Plain text fallback",
"htmlBody": "<!doctype html><html><body><h2>Heading</h2><p>Formatted HTML.</p></body></html>"
}
Alternative shapes are fine; the important requirement is that agents can supply separate plain-text and HTML parts without pretending Markdown is HTML or relying on a single body string.
Acceptance criteria
send_email supports sending a message with separate plain-text and HTML representations.
- Delivered message exposes/contains both MIME alternatives where the provider supports it.
- Existing single-body
body + bodyFormat behavior remains backward compatible.
- Documentation and guides clearly state:
bodyFormat: "html" requires actual HTML markup.
- Markdown/plain text is not automatically converted to HTML.
- Multipart support should be used when both readable fallback text and formatted HTML are required.
- Add tests covering at least:
- HTML-only single-body send.
- Text-only single-body send.
- Multipart plain-text + HTML send.
Context
This came out of a KidsIdKit formatted email failure where the tool path was mistakenly assumed to support multipart email. The current verified safe path is bodyFormat: "html" with actual HTML in body, but multipart support would make formatted outbound email much harder for agents to get wrong.
Summary
Enhance
calendar-mcpemail sending so callers can send proper multipart/alternative messages, especially plain text + HTML email bodies.Problem
The current
send_emailbehavior appears to support a singlebodyvalue plusbodyFormat(textorhtml). That works only when the caller provides the exact content format matchingbodyFormat.This caused real formatting failures:
bodyFormat: "html"but a plain-text/Markdown-style body arrived as an unformatted text blob because there was no actual HTML markup to render.bodyFormat: "text"arrived/rendered incorrectly because the content type did not match the body.The corrected workaround is to send actual HTML and set
bodyFormat: "html", but that is still not as robust as true multipart email.Requested enhancement
Add explicit support for multipart email sending, ideally
multipart/alternative, so callers can provide both:Possible API shape:
{ "accountId": "rockbotagent", "to": ["recipient@example.com"], "cc": [], "subject": "Subject here", "bodyFormat": "multipart", "textBody": "Plain text fallback", "htmlBody": "<!doctype html><html><body><h2>Heading</h2><p>Formatted HTML.</p></body></html>" }Alternative shapes are fine; the important requirement is that agents can supply separate plain-text and HTML parts without pretending Markdown is HTML or relying on a single body string.
Acceptance criteria
send_emailsupports sending a message with separate plain-text and HTML representations.body+bodyFormatbehavior remains backward compatible.bodyFormat: "html"requires actual HTML markup.Context
This came out of a KidsIdKit formatted email failure where the tool path was mistakenly assumed to support multipart email. The current verified safe path is
bodyFormat: "html"with actual HTML inbody, but multipart support would make formatted outbound email much harder for agents to get wrong.