MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / sendMailjetMail

Function sendMailjetMail

packages/@deeplib/mail/src/mailjet.ts:16–44  ·  view source on GitHub ↗
({
  from,
  to,
  subject,
  html,
}: MailOptions)

Source from the content-addressed store, hash-verified

14);
15
16export async function sendMailjetMail({
17 from,
18 to,
19 subject,
20 html,
21}: MailOptions) {
22 const data: SendEmailV3_1.Body = {
23 Messages: [
24 {
25 From: {
26 Name: from.name,
27 Email: from.email,
28 },
29
30 To: to.map((email) => ({
31 Email: email,
32 })),
33
34 Subject: iif(process.env.DEV, '[Mailjet] ', '') + subject,
35
36 HTMLPart: html,
37 },
38 ],
39 };
40
41 await _getMailjet()
42 .post('send', { version: 'v3.1' })
43 .request(data as any);
44}

Callers 1

handleCommandFunction · 0.90

Calls 1

iifFunction · 0.90

Tested by

no test coverage detected