Sha256: 565d4a031d6c5c556f18d07effa88358febe214a795f673ddd8b88e1d72270be
Contents?: true
Size: 918 Bytes
Versions: 2
Compression:
Stored size: 918 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 yandex.net gmx.com gmx.es webdesignspecialist.com.au vp.com onit.com asics.com freemail.hu 139.com mail2world.com slmail.me ) existing_emails = File.open("config/disposable_email_domains.txt") { |f| f.read.split("\n") } remote_emails = [ "https://raw.githubusercontent.com/FGRibreau/mailchecker/master/list.txt", "https://raw.githubusercontent.com/disposable/disposable-email-domains/master/domains.txt", ].flat_map do |url| resp = Net::HTTP.get_response(URI.parse(url)) resp.body.split("\n").flatten end result_emails = (existing_emails + remote_emails).map(&:strip).uniq.sort - whitelisted_emails File.open("config/disposable_email_domains.txt", "w") { |f| f.write result_emails.join("\n") }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
valid_email2-5.0.0 | pull_mailchecker_emails.rb |
valid_email2-4.0.6 | pull_mailchecker_emails.rb |