Text.Email.Parser

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

Safe Haskell | Safe
Language | Haskell2010

Text.Email.Parser

Synopsis

- addrSpec :: Parser EmailAddress
- localPart :: EmailAddress -> ByteString
- domainPart :: EmailAddress -> ByteString
- data EmailAddress
- unsafeEmailAddress :: ByteString -> ByteString -> EmailAddress
- toByteString :: EmailAddress -> ByteString

# Documentation

addrSpec :: Parser EmailAddress

A parser for email addresses.

localPart :: EmailAddress -> ByteString

Extracts the local part of an email address.

domainPart :: EmailAddress -> ByteString

Extracts the domain part of an email address.

data EmailAddress

Represents an email address.

Instances

Eq EmailAddress |
Data EmailAddress |
Ord EmailAddress |
Read EmailAddress |
Show EmailAddress |
Generic EmailAddress |
type Rep EmailAddress |

unsafeEmailAddress :: ByteString -> ByteString -> EmailAddress

Creates an email address without validating it. You should only use this when reading data from somewhere it has already been validated (e.g. a database).

toByteString :: EmailAddress -> ByteString

Converts an email address back to a ByteString