undefined if the given email address is invalid.
import {parseEmailAddress} from 'parse-email-address';
const result1 = parseEmailAddress('simple@example.org');
// result1 is `{user: 'simple', domain: 'example.org', full: 'simple@example.org'}`
const result2 = parseEmailAddress('tld-too-short@foo.x');
// result2 is `undefined`
const result3 = parseEmailAddress('Simple Person <simple@example.org>');
// result3 is `undefined`
Parse a single RFC 5321 email address into parts. This is the strict, envelope-level grammar: it accepts nothing but a bare
user@domain. To read an address out of an RFC 5322 message header (which may carry display names, comments, groups, and multiple addresses), useparseEmailAddressListorparseHeaderEmailAddressinstead.This uses
parsefromsmtp-address-parserv1.1.0.