MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / sendMessage

Function sendMessage

src/modules/gmail.js:78–93  ·  view source on GitHub ↗
({email, message, accessToken})

Source from the content-addressed store, hash-verified

76}
77
78export async function sendMessage({email, message, accessToken}) {
79 const options = {
80 method: 'POST',
81 body: message,
82 mode: 'cors',
83 headers: {
84 'Content-Type': 'message/rfc822',
85 'Content-Length': byteCount(message),
86 Authorization: `Bearer ${accessToken}`,
87 }
88 };
89 return fetchJSON(
90 `https://www.googleapis.com/upload/gmail/v1/users/${email}/messages/send?uploadType=media`,
91 options
92 );
93}
94
95export async function sendMessageMeta({email, message, threadId, accessToken}) {
96 const data = {

Callers

nothing calls this directly

Calls 2

byteCountFunction · 0.90
fetchJSONFunction · 0.85

Tested by

no test coverage detected