Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cogi_email

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cogi_email

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

PhonyRails Build Status Coverage Status GitHub issues Gem Version

This gem provide you library to validate, parsing and format email. Check is email is real or not.

Installation

Add this line to your application's Gemfile:

gem 'cogi_email'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cogi_email

Usage

Validation

Check if a string is a valid email address.

CogiEmail.validate? 'nobi.younet@gmail.com' # => true

Normalization

Normalize phone numer to international format.

CogiEmail.normalize 'Nobi.younet@gmail.com' # => 'nobi.younet@gmail.com'
CogiEmail.normalize '(Nobi)<nobi.younet@gmail.com>' # => 'nobi.younet@gmail.com'

Validate email domain

Check if email domain is valid by making a DNS lookup.

CogiEmail.valid_email_domain? 'nobi.younet@gmail.com' # => true
CogiEmail.valid_email_domain? 'nobi.younet@localhost' # => false

Check if real email

Check if an email address is real or not.

An email address is real if:

  • Is valid
  • Has MX DNS record
  • Can send a test email
CogiEmail.real_email? 'nobi.younet@gmail.com' # => true
CogiEmail.real_email? 'nobi.younet@localhost' # => false

Credit

Thank you Kamil Ciemniewski so much for writing email_verifier gem. I reference his gem to re-writing email checker for this gem.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Don't forget to add tests and run rspec before creating a pull request :)

See all contributors on https://github.com/hoahm/cogi_email/graphs/contributors.

FAQs

Package last updated on 02 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc