MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / getAllEmails

Function getAllEmails

e2e/utils/email.ts:16–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14const host = process.env.MAILPIT_HOST || 'localhost';
15
16export const getAllEmails = async (): Promise<AllEmails> => {
17 const res = await fetch(`http://${host}:8025/api/v1/messages`);
18 return res.json() as Promise<AllEmails>;
19};
20
21export const getFirstEmail = (allEmails: { messages: Email[] }) => {
22 return allEmails.messages[0];

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected