Home

# Class goog.format.EmailAddress

Formats an email address string for display, and allows for extraction of The individual componants of the address.

Instance Method Summary
| `getAddress() ⇒ string` Get the email address.
| `getName() ⇒ string` Get the name associated with the email address.
| `isValid() ⇒ boolean` Determines is the current object is a valid email address.
| `setAddress(string address)` Set the email address.
| `setName(string name)` Set the name associated with the email address.
| `toString() ⇒ string` Return the address in a standard format: - remove extra spaces. - Surround name with quotes if it contains special characters.

Static Method Summary
| `getToken_(string str, number pos) ⇒ string` Get the next token from a position in an address string.
| `isEscapedDlQuote_(string str, number pos) ⇒ boolean` Checks if the character in the current position is an escaped double quote ( \" ).
| `isValidAddrSpec(string str) ⇒ boolean` Checks if the provided string is a valid address spec (local@domain.com).
| `isValidAddress(string str) ⇒ boolean` Checks if the provided string is a valid email address. Supports both simple email addresses (address specs) and addresses that contain display names.
| `parse(string addr) ⇒ ?goog.format.EmailAddress` Parse an email address of the form "name" <address> into an email address.
| `parseList(string str) ⇒ ?Array` Parse a string containing email addresses of the form "name" <address> into an array of email addresses.