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

Function extractEmailFromAddress

apps/sim/lib/messaging/email/utils.ts:26–35  ·  view source on GitHub ↗
(fromAddress: string)

Source from the content-addressed store, hash-verified

24 * Extract the email address from a "Name <email>" formatted string"
25 */
26export function extractEmailFromAddress(fromAddress: string): string | undefined {
27 const match = fromAddress.match(/<([^>]+)>/)
28 if (match) {
29 return match[1]
30 }
31 if (fromAddress.includes('@') && !fromAddress.includes('<')) {
32 return fromAddress.trim()
33 }
34 return undefined
35}
36
37/**
38 * Get the personal email from address and reply-to

Callers 1

getPersonalEmailFromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected