email-validate-2.0.1: Validating an email address string against RFC 5322

Safe HaskellNone

Text.Email.Validate

Synopsis

Documentation

isValid :: ByteString -> BoolSource

Validates whether a particular string is an email address according to RFC5322.

validate :: ByteString -> Either String EmailAddressSource

If you want to find out *why* a particular string is not an email address, use this.

emailAddress :: ByteString -> Maybe EmailAddressSource

Smart constructor for an email address

canonicalizeEmail :: ByteString -> Maybe ByteStringSource

Checks that an email is valid and returns a version of it where comments and whitespace have been removed.

localPart :: EmailAddress -> ByteStringSource

Extracts the local part of an email address.

domainPart :: EmailAddress -> ByteStringSource

Extracts the domain part of an email address.

toByteString :: EmailAddress -> ByteStringSource

Converts an email address back to a ByteString