Email

world.id.email$package.Email
object Email

Parsing, the derived forms, and the two comparisons for Email.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Email.type

Members list

Type members

Classlikes

sealed abstract class Invalid(message: String) extends WorldError

Why an address was refused, in the order the standards layer: the addr-spec grammar, the local part, the domain, then the size limits, which RFC 5321 states in octets rather than characters.

Why an address was refused, in the order the standards layer: the addr-spec grammar, the local part, the domain, then the size limits, which RFC 5321 states in octets rather than characters.

Attributes

Companion
object
Supertypes
class WorldError
class TypedError
trait NoStackTrace
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Domain
class Local
class Syntax
class TooLong
object Invalid

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Invalid.type

Value members

Concrete methods

def parse(raw: String): Either[Invalid, Email]

Parses an addr-spec, lower-casing the domain and leaving the local part exactly as written. Internationalised input is accepted as given: NFC normalisation, which RFC 5891 and RFC 6532 require of a submitter, is the caller's to apply before parsing.

Parses an addr-spec, lower-casing the domain and leaving the local part exactly as written. Internationalised input is accepted as given: NFC normalisation, which RFC 5891 and RFC 6532 require of a submitter, is the caller's to apply before parsing.

Attributes

def sameMailbox(e: Email, o: Email): Boolean

Givens

Givens

given given_Classified_Email: Classified[Email]
given given_Ordering_Email: Ordering[Email]

Extensions

Extensions

extension (e: Email)
def ascii: Option[Email]

The all-ASCII address, its domain a Punycode A-label. None for a non-ASCII local part, which RFC 6530 gives no ASCII equivalent.

The all-ASCII address, its domain a Punycode A-label. None for a non-ASCII local part, which RFC 6530 gives no ASCII equivalent.

Attributes

def domain: Domain

The part after the @, as a Domain rather than text, so its spellings compare and its ASCII form is reachable.

The part after the @, as a Domain rather than text, so its spellings compare and its ASCII form is reachable.

Attributes

def international: Boolean

Whether delivery needs the SMTPUTF8 extension.

Whether delivery needs the SMTPUTF8 extension.

Attributes

def key: String

A grouping key that folds the local part's case. Two addresses sharing one are probably one mailbox, but only the receiving host can say: RFC 5321 leaves local-part semantics to it.

A grouping key that folds the local part's case. Two addresses sharing one are probably one mailbox, but only the receiving host can say: RFC 5321 leaves local-part semantics to it.

Attributes

def local: String

The part before the @, quotes included where the address carries them.

The part before the @, quotes included where the address carries them.

Attributes

def sameMailbox(o: Email): Boolean

Whether both addresses reach one mailbox: local parts equal character-for-character, domains equal as A-labels.

Whether both addresses reach one mailbox: local parts equal character-for-character, domains equal as A-labels.

Attributes

def uri: String

The RFC 6068 mailto URI, its local part percent-encoded down to the unreserved set - which is more than the RFC demands and everything it permits.

The RFC 6068 mailto URI, its local part percent-encoded down to the unreserved set - which is more than the RFC demands and everything it permits.

Attributes

def value: String

The address as stored: the local part as given, the domain lower-cased.

The address as stored: the local part as given, the domain lower-cased.

Attributes