MCPcopy Index your code
hub / github.com/simstudioai/sim / sendWorkspaceAddedEmail

Function sendWorkspaceAddedEmail

apps/sim/lib/invitations/send.ts:299–320  ·  view source on GitHub ↗
(
  input: SendWorkspaceAddedEmailInput
)

Source from the content-addressed store, hash-verified

297 * the workspace and has no acceptance step.
298 */
299export async function sendWorkspaceAddedEmail(
300 input: SendWorkspaceAddedEmailInput
301): Promise<SendInvitationEmailResult> {
302 const workspaceLink = `${getBaseUrl()}/workspace/${input.workspaceId}/home`
303 const emailHtml = await renderWorkspaceAddedEmail(
304 input.inviterName,
305 input.workspaceName,
306 workspaceLink
307 )
308
309 const result = await sendEmail({
310 to: input.email,
311 subject: getEmailSubject('workspace-added'),
312 html: emailHtml,
313 from: getFromEmailAddress(),
314 emailType: 'transactional',
315 })
316 if (!result.success) {
317 return { success: false, error: result.message }
318 }
319 return { success: true }
320}
321
322export async function prepareInvitationResend(params: {
323 invitationId: string

Callers 1

Calls 5

getBaseUrlFunction · 0.90
sendEmailFunction · 0.90
getEmailSubjectFunction · 0.90
getFromEmailAddressFunction · 0.90

Tested by

no test coverage detected