Sha256: 22a2d37c976d2b989f74c970a74330aede1c9f359d3d0972b6ee685b0448e7c4

Contents?: true

Size: 668 Bytes

Versions: 3

Compression:

Stored size: 668 Bytes

Contents

#!/usr/bin/env ruby

require "yaml"

require "json"
require "net/http"

whitelisted_emails = %w(
  onet.pl poczta.onet.pl fastmail.fm hushmail.com
  hush.ai hush.com hushmail.me naver.com qq.com example.com
)

existing_emails = File.open("config/disposable_email_domains.txt") { |f| f.read.split("\n") }

url = "https://raw.githubusercontent.com/FGRibreau/mailchecker/master/list.txt"
resp = Net::HTTP.get_response(URI.parse(url))

remote_emails = resp.body.split("\n").flatten - whitelisted_emails

result_emails = (existing_emails + remote_emails).map(&:strip).uniq.sort

File.open("config/disposable_email_domains.txt", "w") {|f| f.write result_emails.join("\n") }

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
valid_email2-3.2.3 pull_mailchecker_emails.rb
valid_email2-3.2.2 pull_mailchecker_emails.rb
valid_email2-3.2.1 pull_mailchecker_emails.rb