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

Function getEmailSubject

apps/sim/components/emails/subjects.ts:33–82  ·  view source on GitHub ↗
(type: EmailSubjectType)

Source from the content-addressed store, hash-verified

31 * @returns The subject line for the email
32 */
33export function getEmailSubject(type: EmailSubjectType): string {
34 const brandName = getBrandConfig().name
35
36 switch (type) {
37 case 'sign-in':
38 return `Sign in to ${brandName}`
39 case 'email-verification':
40 return `Verify your email for ${brandName}`
41 case 'change-email':
42 return `Verify your new email for ${brandName}`
43 case 'forget-password':
44 return `Reset your ${brandName} password`
45 case 'reset-password':
46 return `Reset your ${brandName} password`
47 case 'existing-account':
48 return `Sign-up attempt with your ${brandName} email`
49 case 'invitation':
50 return `You've been invited to join a team on ${brandName}`
51 case 'batch-invitation':
52 return `You've been invited to join a team and workspaces on ${brandName}`
53 case 'workspace-added':
54 return `You've been added to a workspace on ${brandName}`
55 case 'polling-group-invitation':
56 return `You've been invited to join an email polling group on ${brandName}`
57 case 'help-confirmation':
58 return 'Your request has been received'
59 case 'enterprise-subscription':
60 return `Your Enterprise Plan is now active on ${brandName}`
61 case 'usage-threshold':
62 return `You're nearing your monthly budget on ${brandName}`
63 case 'free-tier-upgrade':
64 return `You're at 80% of your free credits on ${brandName}`
65 case 'plan-welcome-pro':
66 return `Your Pro plan is now active on ${brandName}`
67 case 'plan-welcome-team':
68 return `Your Team plan is now active on ${brandName}`
69 case 'credit-purchase':
70 return `Credits added to your ${brandName} account`
71 case 'abandoned-checkout':
72 return `Quick question`
73 case 'free-tier-exhausted':
74 return `You've run out of free credits on ${brandName}`
75 case 'onboarding-followup':
76 return `Quick question about ${brandName}`
77 case 'welcome':
78 return `Welcome to ${brandName}`
79 default:
80 return brandName
81 }
82}
83
84/**
85 * Subject line for a per-category usage-limit email. Reuses the shared

Callers 12

auth.tsFile · 0.90
sendInvitationEmailFunction · 0.90
sendWorkspaceAddedEmailFunction · 0.90
sendToFunction · 0.90
sendFreeTierEmailFunction · 0.90
sendExhaustedEmailFunction · 0.90
handleAbandonedCheckoutFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
sendLifecycleEmailFunction · 0.90

Calls 1

getBrandConfigFunction · 0.90

Tested by

no test coverage detected