MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getEmailTemplate

Function getEmailTemplate

packages/server/src/enterprise/utils/sendEmail.ts:37–46  ·  view source on GitHub ↗
(defaultTemplateName: string, userTemplatePath?: string)

Source from the content-addressed store, hash-verified

35})
36
37const getEmailTemplate = (defaultTemplateName: string, userTemplatePath?: string) => {
38 try {
39 if (userTemplatePath) {
40 return fs.readFileSync(userTemplatePath, 'utf8')
41 }
42 } catch (error) {
43 console.warn(`Failed to load custom template from ${userTemplatePath}, falling back to default`)
44 }
45 return fs.readFileSync(path.join(__dirname, '../', 'emails', defaultTemplateName), 'utf8')
46}
47
48const sendWorkspaceAdd = async (email: string, workspaceName: string, dashboardLink: string) => {
49 let htmlToSend

Callers 4

sendWorkspaceAddFunction · 0.85
sendWorkspaceInviteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected