|
2 years ago | |
---|---|---|
spec | 4 years ago | |
src | 4 years ago | |
.gitignore | 4 years ago | |
.travis.yml | 4 years ago | |
CHANGELOG | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 2 years ago | |
shard.yml | 2 years ago |
Works with crystal 0.17 - 0.27.0
Add this to your application's shard.yml
:
dependencies:
CrystalEmail:
git: https://git.sceptique.eu/Sceptique/CrystalEmail
## Usage in Crystal
require "CrystalEmail"
# Pure Rfc5322
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
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
Find a bug ? Want a new feature ? Create a clear pull request and we'll see :)