@tak-ps/etl
    Preparing search index...

    Interface EmailMessage

    interface EmailMessage {
        attachments: EmailAttachment[];
        cc: EmailAddress[];
        date: string | null;
        from: EmailAddress | null;
        headers: { key: string; value: string }[];
        html: string | null;
        id: string;
        raw: Buffer;
        ses?: { mail?: Record<string, unknown>; receipt?: Record<string, unknown> };
        subject: string;
        text: string | null;
        to: EmailAddress[];
    }
    Index
    attachments: EmailAttachment[]
    date: string | null

    ISO 8601 sending time or the raw header value if it could not be parsed

    from: EmailAddress | null
    headers: { key: string; value: string }[]

    Every header of the message in document order with lowercase keys

    html: string | null
    id: string

    ID assigned to the message by AWS SES or the path of a local file

    raw: Buffer
    ses?: { mail?: Record<string, unknown>; receipt?: Record<string, unknown> }

    Headers & verdicts reported by AWS SES - absent for local messages

    subject: string
    text: string | null