Created
January 20, 2023 21:33
-
-
Save jasonbyrne/96b3df935844ca18bb39155e6ce6db66 to your computer and use it in GitHub Desktop.
Email message as extracted by postal-mime from Cloudflare Email Router's raw property
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface EmailAttachment { | |
filename: string; | |
mimeType: string; | |
disposition: string; | |
related: boolean; | |
contentId: string; | |
content: unknown; | |
} | |
export interface EmailAddress { | |
address: string; | |
name: string; | |
} | |
export interface EmailHeader { | |
key: string; | |
value: string; | |
} | |
export interface ExtractedEmailMessage { | |
headers: EmailHeader[]; | |
from: EmailAddress; | |
to: EmailAddress[]; | |
cc?: EmailAddress[]; | |
bcc?: EmailAddress[]; | |
replyTo?: EmailAddress; | |
sender?: EmailAddress; | |
messageId: string; | |
inReplyTo: string; | |
references: string; | |
date: string; | |
html: string; | |
text: string; | |
attachments: EmailAttachment[]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment