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)
| 1519 | // ValidateRecipients is the exported seam over validateRecipients so the v1 |
| 1520 | // httpapi layer reuses the same RFC 5322 recipient check. |
| 1521 | func ValidateRecipients(groups ...[]string) error { return validateRecipients(groups...) } |
| 1522 | |
| 1523 | func validateRecipients(groups ...[]string) error { |
| 1524 | for _, group := range groups { |
no test coverage detected