Skip to content

Function: parseAllowedSenders()

parseAllowedSenders(raw): string[]

Normalize a sender allow-list from config (a string[]) or an env var (a CSV / whitespace-separated string). Delegates to the shared net.parseEmails so allow-list patterns are read exactly like recipient lists elsewhere: entries are trimmed, lower-cased (so matching in isSenderAllowed is case-insensitive), and de-duplicated; empties are dropped. An empty result means “no restriction”.

string | string[] | undefined

string[]