*
* This is common in USPS Informed Delivery emails where mail piece scans
* are embedded as inline attachments rather than external URLs.
*
* PERFORMANCE: Uses Promise.all() for parallel attachment fetching instead
* of sequential fetching, significantly reducing latency for emails with
* multiple inline images (e.g., USPS Informed Delivery with 5-10 mail scans).
*/
async function resolveCidReferences(
messageId: string,
parts: any[],
htmlContent: string,
client: GmailClient,
debugMode: boolean,
): Promise| DATE | SUBJECT | LABEL | CONTENT |
|---|---|---|---|
| {email.date} | {email.subject} | {derive(email, (email) => email?.labelIds?.join(", "))} |
Show Markdown
{email.markdownContent}
|