MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / ValidateRecipients

Function ValidateRecipients

internal/agent/api.go:1521–1521  ·  view source on GitHub ↗

validateRecipients ensures every entry in the joined To/CC/BCC slices is a syntactically valid RFC 5322 address. We use net/mail.ParseAddress rather than a custom regex because it handles bare local@domain, display-name forms ("Bob Smith "), quoted local parts, and IDN domains uniformly.

(groups ...[]string)

Source from the content-addressed store, hash-verified

1519// ValidateRecipients is the exported seam over validateRecipients so the v1
1520// httpapi layer reuses the same RFC 5322 recipient check.
1521func ValidateRecipients(groups ...[]string) error { return validateRecipients(groups...) }
1522
1523func validateRecipients(groups ...[]string) error {
1524 for _, group := range groups {

Callers 3

handleReplyMethod · 0.92
handleForwardMethod · 0.92
validateOutboundBodyMethod · 0.92

Calls 1

validateRecipientsFunction · 0.85

Tested by

no test coverage detected