email-authentication 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9de60ed43cf8b52f6533c0fc48015353403188b5
4
- data.tar.gz: fb47c4c635b4f4142bd5a3b551394abfdcdc0fbf
3
+ metadata.gz: 922c427332a2ff4d0d1305b48df25f4c77c974cf
4
+ data.tar.gz: a1262da63fdd8070f948c91d747a3654e1244e8b
5
5
  SHA512:
6
- metadata.gz: e86dd7c7f00e15dca20cdc6b4ce42439168491a6b3d0871e15982fdd20e1322b3951f03d652517431f2998ea01a903c71d508065b5140f3b30f8108d5bc51cdd
7
- data.tar.gz: 34c874f3f84057655072d552e279671047174cfffb7d64927a7c07dae7a2234a84b16b9cf7b7341f22b2fc432e232fa81b53b3c58309dbbebfb9c632166fb045
6
+ metadata.gz: d24993a136b1ea6b54e95945288f8ac3d53f43a8308c66147f8887bcf3dc9973aabc969f8153a82855a3a16a06d5737c6232dc385e078d9ea2e4c4fc121c47ef
7
+ data.tar.gz: 029c5f2f55907cd6ff5b55d8b4effdfd30f5090fa7fbb0ebc31e7a4681dfe89e25517d7da0258688f053dba34df5f7ec8379a23b04903e942dcdf1ddb2fbc7a1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- email-authentication (0.2.2)
4
+ email-authentication (0.2.3)
5
5
  dnsruby
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -10,7 +10,7 @@ Given an email address, check to see if it is valid. Check the structure of the
10
10
  NaySayers Read here
11
11
  ===================
12
12
 
13
- It is NOT possible to verify an email address unless you send an email to it. And even then you may get a transient bounce. This gem tries its best to check to see if the address is valid. But is DOES NOT guarantee validity. Then why this gem? Because sometimes you receive a list of email addresses and you want to test them before adding to an email service provider list so your account is not blocked due to failing addresses. This gem helps in that process
13
+ It is NOT possible to verify an email address unless you send an email to it. And even then you may get a transient bounce. This gem tries its best to check to see if the address is valid. But is DOES NOT guarantee validity. Then why this gem? Because sometimes you receive a list of email addresses [when you are at a tradeshow and someone types in the wrong addresses etc.] and you want to test them before adding to an email service provider list so your account is not blocked due to failing addresses. This gem helps in that process
14
14
 
15
15
  Alternatives
16
16
  ============
@@ -27,13 +27,15 @@ puts "Check check_and_addvtiger_list.rb filename <from> <url> <username> <key>"
27
27
  #puts "Address is #{[address]} From address [#{from}]"
28
28
  setup_vtiger_internal
29
29
  @f=EmailAuthentication::Base.new
30
+ count=0
30
31
  File.open(filename).each do |line|
31
- address=line.chomp
32
- success,msg=@f.check(address,from)
32
+ count=count+1
33
+ address=line.chomp
34
+ success,msg=@f.check(address,from)
33
35
  if success
34
36
  addleademail(@f.name,@f.domain,address)
35
- puts "Success: #{address} messages #{msg}" if success
37
+ puts "Success: #{count} #{address} messages #{msg}" if success
36
38
  end
37
39
 
38
- puts "Failure: #{address} messages: #{msg}" if !success
40
+ puts "Failure: #{count} #{address} messages: #{msg}" if !success
39
41
  end
data/bin/emailcheck.rb CHANGED
@@ -1,12 +1,32 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
3
  require 'email-authentication'
4
+ require 'thor'
4
5
  # needs upgrade to thor
5
- puts "Check emailcheck.rb <address> <from>"
6
- address = ARGV[0]
7
- from=ARGV[1]
8
- puts "Address is #{[address]} From address [#{from}]"
9
- @f=EmailAuthentication::Base.new
10
- success,msg=@f.check(address,from)
11
- puts "Success: #{address} messages #{msg}" if success
12
- puts "Failure: #{address} messages: #{msg}" if !success
6
+ #puts "Check emailcheck.rb check <address> --from <from>"
7
+
8
+ class CheckEmailCLI < Thor
9
+ desc "check", "check an email address to see if it is valid for mx, smtp and format usage: emailcheck.rb check address --from fromadd"
10
+ option :from, :required => true
11
+ def check(address)
12
+ puts "checking address => #{address}, from => #{options[:from]}"
13
+ @f=EmailAuthentication::Base.new
14
+ success,msg=@f.check(address,options[:from])
15
+ if success
16
+ puts "Success: #{address} messages #{msg}"
17
+ else
18
+ puts "Failure: #{address} messages: #{msg}"
19
+ end
20
+ end
21
+ desc 'hello', "just print the command line"
22
+ option :from, :required => true
23
+ def hello(name)
24
+ puts "from: #{options[:from]}"
25
+ puts "Hello #{name}"
26
+ end
27
+ end
28
+
29
+ CheckEmailCLI.start(ARGV)
30
+
31
+
32
+
@@ -86,6 +86,7 @@ module EmailAuthentication
86
86
  domain=self.from.split('@')
87
87
  @fromdomain = domain[1]
88
88
  if @mx.include?('google') or @mx.include?('live.com')
89
+ # DO I Need to do this?
89
90
  flag=true
90
91
  msg="smtp not checked since google or live: #{@mx}"
91
92
  else
@@ -14,7 +14,7 @@
14
14
  <img src="./assets/0.7.1/loading.gif" alt="loading"/>
15
15
  </div>
16
16
  <div id="wrapper" style="display:none;">
17
- <div class="timestamp">Generated <abbr class="timeago" title="2013-10-28T09:25:34+08:00">2013-10-28T09:25:34+08:00</abbr></div>
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2013-10-28T09:29:06+08:00">2013-10-28T09:29:06+08:00</abbr></div>
18
18
  <ul class="group_tabs"></ul>
19
19
 
20
20
  <div id="content">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email-authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Sproule
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: Try and authenticate email address, check format, lookup mx record and
28
42
  check smtp connectivity
29
43
  email: scott.sproule@ficonab.com