inspect_email
Inspect email headers and MIME structure without downloading bodies. View part details to decide which attachments to download.
Instructions
Inspect an email's headers and MIME structure WITHOUT downloading bodies.
Uses FETCH BODYSTRUCTURE + header subset — returns in milliseconds even for huge messages with attachments. Ideal for:
Previewing large emails without tying up bandwidth
Deciding which attachment to download (see fetch_part)
Bulk processing many messages efficiently
Returns subject/from/to/date/size plus a list of MIME parts, each with:
part: part number (e.g. "1", "2", "2.1") — pass to fetch_part
type: MIME type (e.g. "text/plain", "application/pdf")
size: part size in bytes (may be None)
charset: for text parts
filename: for attachments (RFC 2231 / MIME decoded)
disposition: "inline" or "attachment"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | ||
| email_id | Yes |