2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/detect_email_settings/detect_known.rb', line 2
def self.get_known_settings(email)
aol = {
:method => :imap,
:port => 143,
:address => 'imap.aol.com',
:enable_ssl => false,
:domains => ['aol.com']
}
gmail = {
:method => :imap,
:port => 993,
:address => 'imap.gmail.com',
:enable_ssl => true,
:domains => ['gmail.com'],
:notice => "You need to <a href=\"http://support.google.com/mail/bin/answer.py?hl=en&answer=77695\">Enable IMAP Access</a> on your GMail account if you want to use this account with our service."
}
hotmail = {
:method => :pop3,
:port => 995,
:address => 'pop3.live.com',
:enable_ssl => true,
:domains => ['hotmail.com', 'live.com', 'msn.com'],
:notice => "MSN.com email addresses are known to have issues."
}
mailcom = {
:method => :pop3,
:port => 110,
:address => 'pop.mail.com',
:enable_ssl => false,
:domains => ["mail.com", "email.com", "usa.com", "myself.com", "consultant.com", "post.com", "europe.com", "london.com", "asia.com", "iname.com", "writeme.com", "dr.com", "engineer.com", "cheerful.com", "accountant.com", "techie.com", "linuxmail.org", "lawyer.com", "uymail.com", "contractor.net", "accountant.com", "activist.com", "adexec.com", "allergist.com", "alumni.com", "alumnidirector.com", "angelic.com", "appraiser.net", "archaeologist.com", "arcticmail.com", "artlover.com", "asia.com", "auctioneer.net", "bartender.net", "bikerider.com", "birdlover.com", "brew-meister.com", "cash4u.com", "chef.net", "chemist.com", "clerk.com", "clubmember.org", "collector.org", "columnist.com", "comic.com", "computer4u.com", "consultant.com", "contractor.net", "coolsite.net", "counsellor.com", "cyberservices.com", "deliveryman.com", "diplomats.com", "disposable.com", "doctor.com", "dr.com", "engineer.com", "execs.com", "fastservice.com", "financier.com", "fireman.net", "gardener.com", "geologist.com", "graduate.org", "graphic-designer.com", "groupmail.com", "hairdresser.net", "homemail.com", "hot-shot.com", "instruction.com", "instructor.net", "insurer.com", "job4u.com", "journalist.com", "lawyer.com", "legislator.com", "lobbyist.com", "minister.com", "musician.org", "myself.com", "net-shopping.com", "optician.com", "orthodontist.net", "pediatrician.com", "photographer.net", "physicist.net", "planetmail.com", "planetmail.net", "politician.com", "post.com", "presidency.com", "priest.com", "programmer.net", "publicist.com", "qualityservice.com", "radiologist.net", "realtyagent.com", "registerednurses.com", "repairman.com", "representative.com", "rescueteam.com", "revenue.com", "salesperson.net", "scientist.com", "secretary.net", "socialworker.net", "sociologist.com", "solution4u.com", "songwriter.net", "surgical.net", "teachers.org", "tech-center.com", "techie.com", "technologist.com", "theplate.com", "therapist.net", "toothfairy.com", "tvstar.com", "umpire.com", "webname.com", "worker.com", "workmail.com", "writeme.com", "activist.com", "aircraftmail.com", "artlover.com", "atheist.com", "bikerider.com", "birdlover.com", "blader.com", "boardermail.com", "brew-master.com", "brew-meister.com", "bsdmail.com", "catlover.com", "chef.net", "clubmember.org", "collector.org", "cutey.com", "dbzmail.com", "doglover.com", "doramail.com", "gardener.com", "greenmail.net", "hackermail.com", "hilarious.com", "keromail.com", "kittymail.com", "linuxmail.org", "lovecat.com", "marchmail.com", "musician.org", "nonpartisan.com", "petlover.com", "photographer.net", "snakebite.com", "songwriter.net", "techie.com", "theplate.com", "toke.com", "uymail.com", "computer4u.com", "consultant.com", "contractor.net", "coolsite.net", "cyberdude.com", "cybergal.com", "cyberservices.com", "cyber-wizard.com", "engineer.com", "fastservice.com", "graphic-designer.com", "groupmail.com", "homemail.com", "hot-shot.com", "housemail.com", "humanoid.net", "iname.com", "inorbit.com", "mail-me.com", "myself.com", "net-shopping.com", "null.net", "physicist.net", "planetmail.com", "planetmail.net", "post.com", "programmer.net", "qualityservice.com", "rocketship.com", "scientist.com", "solution4u.com", "tech-center.com", "techie.com", "technologist.com", "webname.com", "workmail.com", "writeme.com", "acdcfan.com", "angelic.com", "artlover.com", "atheist.com", "chemist.com", "diplomats.com", "discofan.com", "elvisfan.com", "execs.com", "hiphopfan.com", "housemail.com", "kissfans.com", "madonnafan.com", "metalfan.com", "minister.com", "musician.org", "ninfan.com", "oath.com", "ravemail.com", "reborn.com", "reggaefan.com", "snakebite.com", "songwriter.net", "bellair.net", "californiamail.com", "dallasmail.com", "nycmail.com", "pacific-ocean.com", "pacificwest.com", "sanfranmail.com", "usa.com", "africamail.com", "arcticmail.com", "asia.com", "asia-mail.com", "australiamail.com", "berlin.com", "brazilmail.com", "chinamail.com", "dublin.com", "dutchmail.com", "englandmail.com", "europe.com", "europemail.com", "germanymail.com", "irelandmail.com", "israelmail.com", "italymail.com", "japan.com", "koreamail.com", "london.com", "madrid.com", "mexicomail.com", "moscowmail.com", "munich.com", "polandmail.com", "rome.com", "safrica.com", "samerica.com", "scotlandmail.com", "singapore.com", "spainmail.com", "swedenmail.com", "swissmail.com", "tokyo.com", "torontomail.com", "angelic.com", "atheist.com", "disciples.com", "innocent.com", "minister.com", "muslim.com", "oath.com", "priest.com", "protestant.com", "reborn.com", "reincarnate.com", "religious.com", "saintly.com"],
:notice => "Your email provider requires a Plus account or higher in order to use this address for our service."
}
yahoo = {
:method => :pop3,
:port => 995,
:address => 'pop.mail.yahoo.com',
:enable_ssl => true,
:domains => ['yahoo.com', 'ymail.com', 'rocketmail.com']
}
domains = {}
[aol, gmail, hotmail, mailcom, yahoo].each do |site|
site[:domains].each do |domain|
domains[domain] = site
end
end
address = Mail::Address.new(email)
if domains.has_key? address.domain.downcase
return domains[address.domain]
end
nil
end
|