MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / sendEmailCode

Function sendEmailCode

e2e/scenarios/connect-handoff.test.ts:74–89  ·  view source on GitHub ↗
(slug: string, subject: string)

Source from the content-addressed store, hash-verified

72`;
73
74const sendEmailCode = (slug: string, subject: string) => `
75const found = await tools.search({ namespace: ${JSON.stringify(slug)}, query: "send email", limit: 5 });
76const path = found.items[0]?.path;
77if (!path) return { ok: false, error: "no send tool found", items: found.items };
78let t = tools;
79for (const seg of path.split(".")) t = t[seg];
80const sent = await t({
81 body: {
82 from: "onboarding@example.com",
83 to: "e2e@example.com",
84 subject: ${JSON.stringify(subject)},
85 html: "<p>connect-handoff e2e</p>",
86 },
87});
88return { ok: sent.ok, path, result: sent.ok ? sent.data : sent.error };
89`;
90
91/** Run `execute`, auto-approving any paused executions (approval-gated tools
92 * pause once per gated call) and parse the sandbox's JSON return value. */

Callers 1

runScenarioFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected