@hackage addy0.1.0.1
A full-featured library for parsing, validating, and rendering email addresses
Categories
License
BSD-2-Clause
Maintainer
Peter Jones <pjones@devalot.com>
Links
Versions
Installation
Tested Compilers
Dependencies (9)
- base >=4.9 && <5.0
- bytestring >=0.10 && <0.12
- text ^>=1.2
- attoparsec ^>=0.13
- ip >=1.5.1 && <1.8
- lens >=4.17 && <5.0 Show all…
Dependents (0)
Addy: a modern library for working with email addresses
A full-featured library for parsing, validating, and rendering email addresses.
Decoding
Addy.decode "example@example.com"
-- Right (EmailAddr "example@example.com")
Addy.decode "我買@屋企.香港"
-- Right (EmailAddr "\25105\36023@\23627\20225.\39321\28207")
Addy.decode "Mary Smith <mary@example.net> (hi there!)"
-- Right (EmailAddr "Mary Smith <mary@example.net> (hi there!)")
Addy.decode "example@[127.0.0.1]"
-- Right (EmailAddr "example@[127.0.0.1]")
Encoding
Addy.encode address
-- "example@example.com"
Addy.decode "Mary Smith <mary@example.net> (hi there!)"
& second Addy.encodeFull
-- Right "Mary Smith <mary@example.net> (hi there!)"