MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / sendEmail

Function sendEmail

app/src/server/emails/sendEmail.ts:18–37  ·  view source on GitHub ↗
(options: { to: string; subject: string; body: string })

Source from the content-addressed store, hash-verified

16 : null;
17
18export const sendEmail = async (options: { to: string; subject: string; body: string }) => {
19 const bodyHtml = await marked.parseInline(options.body, { mangle: false });
20
21 try {
22 if (!transporter) {
23 console.log("Sent email (fake):", options);
24 return;
25 }
26 await transporter.sendMail({
27 from: env.SENDER_EMAIL,
28 to: options.to,
29 subject: options.subject,
30 html: bodyHtml,
31 text: options.body,
32 });
33 } catch (error) {
34 console.error("error sending email", error);
35 throw error;
36 }
37};

Callers 5

sendInvoiceNotificationFunction · 0.90
sendFineTuneModelTrainedFunction · 0.90
sendPaymentFailedFunction · 0.90
sendPaymentSuccessfulFunction · 0.90
sendProjectInvitationFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected