MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / getMessageMimeType

Function getMessageMimeType

src/modules/gmail.js:39–44  ·  view source on GitHub ↗
({msgId, email, accessToken})

Source from the content-addressed store, hash-verified

37}
38
39export async function getMessageMimeType({msgId, email, accessToken}) {
40 const {payload} = await getMessage({msgId, email, accessToken, format: 'metadata', metaHeaders: ['content-type']});
41 const contentType = extractMailHeader(payload, 'Content-Type');
42 const {protocol} = parseQuery(contentType, ';');
43 return {mimeType: payload.mimeType, protocol};
44}
45
46export async function getAttachment({email, msgId, attachmentId, fileName, accessToken}) {
47 if (!attachmentId) {

Callers

nothing calls this directly

Calls 3

extractMailHeaderFunction · 0.85
parseQueryFunction · 0.85
getMessageFunction · 0.70

Tested by

no test coverage detected