Skip to main content

parse_emails

Function parse_emails 

Source
pub(crate) fn parse_emails(raw: &str) -> Result<Vec<String>>
Expand description

Parse the --emails argument into a list of email addresses.

The legacy CLI accepts four shapes, in order of precedence:

  1. A JSON array: ["[email protected]", "[email protected]"]
  2. A comma-separated list: [email protected],[email protected]
  3. A space-separated list: [email protected] [email protected]
  4. A single address: [email protected]

Returns an error if the parsed list is empty or any entry fails a basic shape check.