CrystalEmail
Version, currently main branch1 version
- main branchlatestAug 3, 2022
github.com/jwoertink/CrystalEmail
No description declared in shard.yml.
0 stars
0 dependents
License: WTFPL
Installation
# Add this to your shard.yml
dependencies:
CrystalEmail:
github: jwoertink/CrystalEmail
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.0.0- License
- WTFPL
- Author
- Arthur Poulet
Dependencies
This version declares no dependencies.
README
A RFC compliant Email validator
Migrated to https://git.sceptique.eu/Sceptique/CrystalEmail
Prelude
- What is an Email Address ?
- What is a Domain Name ?
Compliance
To do
- To do : rfc 6530.
- To do : Implement IPv6
Notes
- No ipv6 for now
- No escaped characters
- Public email validity (no raw ip, domain withour root domain, ...)
Installation
Tested with crystal 0.17 - 1.1.0
Add this to your application's shard.yml:
dependencies:
CrystalEmail:
git: https://git.sceptique.eu/Sceptique/CrystalEmail
branch: master
Usage in Crystal
require "CrystalEmail"
# Pure Rfc5322
# this is what you want if you need to allow local domains
CrystalEmail::Rfc5322.validates? "toto@tata" # => true
CrystalEmail::Rfc5322.match "toto@tata" # => #<MatchData "toto@tata" local:"toto" domain:"tata">
CrystalEmail::Rfc5322.validates? "toto" # => false
CrystalEmail::Rfc5322.match "toto" # => nil
# Rfc5322 + Internet basic usage
# most of the website on internet will require a domain like "domain.thing"
CrystalEmail::Rfc5322::Public.validates? "toto@tata.com" # => true
CrystalEmail::Rfc5322::Public.match "toto@tata.com" # => #<MatchData "toto@tata" local:"toto" domain:"tata.com">
"toto@toto.toto".is_email? # => true
Contributes !
Find a bug ? Want a new feature ? Create a clear pull request and we'll see :)
- Sceptique
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Aug 3, 2022
- Crystal
>= 1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jwoertink/CrystalEmail
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1