mail_autoconfig 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +39 -0
- data/LICENSE.txt +25 -0
- data/README.md +57 -0
- data/Rakefile +11 -0
- data/doc/MailAutoconfig/ClientConfig.html +1353 -0
- data/doc/MailAutoconfig/EmailAddress.html +572 -0
- data/doc/MailAutoconfig/IncomingServer.html +154 -0
- data/doc/MailAutoconfig/OutgoingServer.html +154 -0
- data/doc/MailAutoconfig/Server.html +807 -0
- data/doc/MailAutoconfig.html +424 -0
- data/doc/_index.html +185 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +135 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +135 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +227 -0
- data/doc/top-level-namespace.html +112 -0
- data/ispdb_data/1und1.de +65 -0
- data/ispdb_data/abc.plala.or.jp +24 -0
- data/ispdb_data/agate.plala.or.jp +24 -0
- data/ispdb_data/alice.it +30 -0
- data/ispdb_data/amail.plala.or.jp +24 -0
- data/ispdb_data/amber.plala.or.jp +24 -0
- data/ispdb_data/aol.com +45 -0
- data/ispdb_data/apost.plala.or.jp +24 -0
- data/ispdb_data/aqua.plala.or.jp +24 -0
- data/ispdb_data/arcor.de +57 -0
- data/ispdb_data/arubapec.it +34 -0
- data/ispdb_data/att.net +34 -0
- data/ispdb_data/ballade.plala.or.jp +24 -0
- data/ispdb_data/bay.wind.ne.jp +28 -0
- data/ispdb_data/bb-niigata.jp +22 -0
- data/ispdb_data/beige.plala.or.jp +24 -0
- data/ispdb_data/biglobe.ne.jp +23 -0
- data/ispdb_data/bigpond.com +28 -0
- data/ispdb_data/blue.plala.or.jp +24 -0
- data/ispdb_data/bluemail.ch +31 -0
- data/ispdb_data/bluewin.ch +30 -0
- data/ispdb_data/bmail.plala.or.jp +24 -0
- data/ispdb_data/bol.com.br +40 -0
- data/ispdb_data/bolero.plala.or.jp +24 -0
- data/ispdb_data/bpost.plala.or.jp +24 -0
- data/ispdb_data/broba.cc +25 -0
- data/ispdb_data/brown.plala.or.jp +24 -0
- data/ispdb_data/camel.plala.or.jp +24 -0
- data/ispdb_data/cameo.plala.or.jp +24 -0
- data/ispdb_data/cc9.ne.jp +21 -0
- data/ispdb_data/cek.ne.jp +21 -0
- data/ispdb_data/cgl.ucsf.edu +22 -0
- data/ispdb_data/charter.com +52 -0
- data/ispdb_data/clio.ne.jp +22 -0
- data/ispdb_data/cmail.plala.or.jp +24 -0
- data/ispdb_data/co1.wind.ne.jp +25 -0
- data/ispdb_data/co2.wind.ne.jp +25 -0
- data/ispdb_data/co3.wind.ne.jp +25 -0
- data/ispdb_data/cocoa.plala.or.jp +24 -0
- data/ispdb_data/coda.plala.or.jp +24 -0
- data/ispdb_data/comcast.net +57 -0
- data/ispdb_data/concerto.plala.or.jp +24 -0
- data/ispdb_data/coral.plala.or.jp +24 -0
- data/ispdb_data/courante.plala.or.jp +24 -0
- data/ispdb_data/cox.net +36 -0
- data/ispdb_data/cpost.plala.or.jp +24 -0
- data/ispdb_data/cream.plala.or.jp +24 -0
- data/ispdb_data/dan.wind.ne.jp +28 -0
- data/ispdb_data/dance.plala.or.jp +24 -0
- data/ispdb_data/dd.iij4u.or.jp +33 -0
- data/ispdb_data/df.eu +33 -0
- data/ispdb_data/dmail.plala.or.jp +24 -0
- data/ispdb_data/earthlink.net +35 -0
- data/ispdb_data/ebony.plala.or.jp +24 -0
- data/ispdb_data/email.it +33 -0
- data/ispdb_data/email.plala.or.jp +24 -0
- data/ispdb_data/ewetel.de +23 -0
- data/ispdb_data/fantasy.plala.or.jp +24 -0
- data/ispdb_data/flamenco.plala.or.jp +24 -0
- data/ispdb_data/fmail.plala.or.jp +24 -0
- data/ispdb_data/francetelecom.fr +31 -0
- data/ispdb_data/free.fr +62 -0
- data/ispdb_data/freenet.de +56 -0
- data/ispdb_data/fuga.plala.or.jp +24 -0
- data/ispdb_data/gandi.net +58 -0
- data/ispdb_data/gmail.plala.or.jp +24 -0
- data/ispdb_data/gmx.com +72 -0
- data/ispdb_data/gmx.net +66 -0
- data/ispdb_data/go.tvm.ne.jp +22 -0
- data/ispdb_data/goneo.de +56 -0
- data/ispdb_data/goo.jp +22 -0
- data/ispdb_data/googlemail.com +52 -0
- data/ispdb_data/grape.plala.or.jp +24 -0
- data/ispdb_data/gray.plala.or.jp +24 -0
- data/ispdb_data/hal.ne.jp +22 -0
- data/ispdb_data/hana.or.jp +22 -0
- data/ispdb_data/hotmail.com +58 -0
- data/ispdb_data/i.softbank.jp +22 -0
- data/ispdb_data/ic-net.or.jp +22 -0
- data/ispdb_data/iijmio-mail.jp +26 -0
- data/ispdb_data/iiyama-catv.ne.jp +21 -0
- data/ispdb_data/imail.plala.or.jp +24 -0
- data/ispdb_data/inbox.lt +26 -0
- data/ispdb_data/inbox.lv +26 -0
- data/ispdb_data/indigo.plala.or.jp +24 -0
- data/ispdb_data/inet-shibata.or.jp +22 -0
- data/ispdb_data/internode.on.net +32 -0
- data/ispdb_data/ipax.at +28 -0
- data/ispdb_data/ivory.plala.or.jp +24 -0
- data/ispdb_data/iwafune.ne.jp +22 -0
- data/ispdb_data/jade.plala.or.jp +24 -0
- data/ispdb_data/janis.or.jp +23 -0
- data/ispdb_data/jet.ne.jp +29 -0
- data/ispdb_data/ji.jet.ne.jp +22 -0
- data/ispdb_data/jmail.plala.or.jp +24 -0
- data/ispdb_data/kabelmail.de +31 -0
- data/ispdb_data/kelcom.net +21 -0
- data/ispdb_data/khaki.plala.or.jp +24 -0
- data/ispdb_data/kl.wind.ne.jp +32 -0
- data/ispdb_data/kmail.plala.or.jp +24 -0
- data/ispdb_data/kokuyou.ne.jp +21 -0
- data/ispdb_data/lapis.plala.or.jp +24 -0
- data/ispdb_data/laposte.net +37 -0
- data/ispdb_data/lemon.plala.or.jp +24 -0
- data/ispdb_data/libero.it +34 -0
- data/ispdb_data/lilac.plala.or.jp +24 -0
- data/ispdb_data/lime.plala.or.jp +24 -0
- data/ispdb_data/mahoroba.ne.jp +22 -0
- data/ispdb_data/mail.com +248 -0
- data/ispdb_data/mail.dk +22 -0
- data/ispdb_data/mail.iwafune.ne.jp +22 -0
- data/ispdb_data/mail.ru +57 -0
- data/ispdb_data/mail.telenor.dk +121 -0
- data/ispdb_data/mail.wind.ne.jp +29 -0
- data/ispdb_data/maroon.plala.or.jp +24 -0
- data/ispdb_data/me.com +31 -0
- data/ispdb_data/minuet.plala.or.jp +24 -0
- data/ispdb_data/ml.murakami.ne.jp +22 -0
- data/ispdb_data/mnet.ne.jp +22 -0
- data/ispdb_data/mopera.net +50 -0
- data/ispdb_data/mozilla.com +23 -0
- data/ispdb_data/mx1.tiki.ne.jp +54 -0
- data/ispdb_data/navy.plala.or.jp +24 -0
- data/ispdb_data/nifty.com +22 -0
- data/ispdb_data/nsat.jp +22 -0
- data/ispdb_data/o2.pl +35 -0
- data/ispdb_data/olive.plala.or.jp +24 -0
- data/ispdb_data/onet.pl +38 -0
- data/ispdb_data/opal.plala.or.jp +24 -0
- data/ispdb_data/orange.plala.or.jp +24 -0
- data/ispdb_data/orchid.plala.or.jp +24 -0
- data/ispdb_data/ovh.net +32 -0
- data/ispdb_data/pal.kijimadaira.jp +21 -0
- data/ispdb_data/palette.plala.or.jp +24 -0
- data/ispdb_data/parabox.or.jp +22 -0
- data/ispdb_data/pdx.edu +41 -0
- data/ispdb_data/peach.plala.or.jp +24 -0
- data/ispdb_data/peoplepc.com +29 -0
- data/ispdb_data/plum.plala.or.jp +24 -0
- data/ispdb_data/po.dcn.ne.jp +21 -0
- data/ispdb_data/po.wind.ne.jp +28 -0
- data/ispdb_data/pobox.com +53 -0
- data/ispdb_data/polka.plala.or.jp +24 -0
- data/ispdb_data/pop.shibata.ne.jp +23 -0
- data/ispdb_data/posteo.de +25 -0
- data/ispdb_data/purple.plala.or.jp +24 -0
- data/ispdb_data/rainbow.plala.or.jp +24 -0
- data/ispdb_data/rambler.ru +35 -0
- data/ispdb_data/red.plala.or.jp +24 -0
- data/ispdb_data/rmail.plala.or.jp +24 -0
- data/ispdb_data/rondo.plala.or.jp +24 -0
- data/ispdb_data/rose.plala.or.jp +24 -0
- data/ispdb_data/rouge.plala.or.jp +24 -0
- data/ispdb_data/rr.com +25 -0
- data/ispdb_data/ruby.plala.or.jp +24 -0
- data/ispdb_data/sakunet.ne.jp +21 -0
- data/ispdb_data/sea.plala.or.jp +24 -0
- data/ispdb_data/sepia.plala.or.jp +24 -0
- data/ispdb_data/serenade.plala.or.jp +24 -0
- data/ispdb_data/seznam.cz +26 -0
- data/ispdb_data/sfr.fr +36 -0
- data/ispdb_data/silk.plala.or.jp +24 -0
- data/ispdb_data/silver.plala.or.jp +24 -0
- data/ispdb_data/sky.plala.or.jp +24 -0
- data/ispdb_data/skynet.be +35 -0
- data/ispdb_data/smail.plala.or.jp +24 -0
- data/ispdb_data/snow.plala.or.jp +24 -0
- data/ispdb_data/so.wind.ne.jp +25 -0
- data/ispdb_data/sonata.plala.or.jp +24 -0
- data/ispdb_data/strato.de +43 -0
- data/ispdb_data/studenti.univr.it +22 -0
- data/ispdb_data/suite.plala.or.jp +24 -0
- data/ispdb_data/sympatico.ca +30 -0
- data/ispdb_data/symphony.plala.or.jp +24 -0
- data/ispdb_data/t-online.de +37 -0
- data/ispdb_data/taupe.plala.or.jp +24 -0
- data/ispdb_data/terra.es +29 -0
- data/ispdb_data/tiki.ne.jp +24 -0
- data/ispdb_data/tiscali.cz +25 -0
- data/ispdb_data/tiscali.it +31 -0
- data/ispdb_data/tmail.plala.or.jp +24 -0
- data/ispdb_data/toccata.plala.or.jp +24 -0
- data/ispdb_data/topaz.plala.or.jp +24 -0
- data/ispdb_data/trio.plala.or.jp +24 -0
- data/ispdb_data/umail.plala.or.jp +24 -0
- data/ispdb_data/umich.edu +22 -0
- data/ispdb_data/uol.com.br +42 -0
- data/ispdb_data/upcmail.nl +23 -0
- data/ispdb_data/verizon.net +21 -0
- data/ispdb_data/versatel.de +43 -0
- data/ispdb_data/violet.plala.or.jp +24 -0
- data/ispdb_data/vm.aikis.or.jp +22 -0
- data/ispdb_data/vmail.plala.or.jp +24 -0
- data/ispdb_data/vp.tiki.ne.jp +24 -0
- data/ispdb_data/waltz.plala.or.jp +24 -0
- data/ispdb_data/wave.plala.or.jp +24 -0
- data/ispdb_data/web.de +55 -0
- data/ispdb_data/white.plala.or.jp +24 -0
- data/ispdb_data/wildwestdomains.com +37 -0
- data/ispdb_data/wine.plala.or.jp +24 -0
- data/ispdb_data/wmail.plala.or.jp +24 -0
- data/ispdb_data/wp.pl +22 -0
- data/ispdb_data/xmail.plala.or.jp +24 -0
- data/ispdb_data/xp.wind.jp +24 -0
- data/ispdb_data/xpost.plala.or.jp +24 -0
- data/ispdb_data/xs4all.nl +22 -0
- data/ispdb_data/xtra.co.nz +22 -0
- data/ispdb_data/yahoo.co.jp +22 -0
- data/ispdb_data/yahoo.com +41 -0
- data/ispdb_data/yandex.ru +39 -0
- data/ispdb_data/ybb.ne.jp +22 -0
- data/ispdb_data/yellow.plala.or.jp +24 -0
- data/ispdb_data/ymail.plala.or.jp +24 -0
- data/ispdb_data/ypost.plala.or.jp +24 -0
- data/ispdb_data/ziggo.nl +25 -0
- data/ispdb_data/zmail.plala.or.jp +24 -0
- data/ispdb_data/zpost.plala.or.jp +24 -0
- data/lib/mail_autoconfig/client_config.rb +118 -0
- data/lib/mail_autoconfig/email_address.rb +53 -0
- data/lib/mail_autoconfig/server.rb +73 -0
- data/lib/mail_autoconfig/version.rb +4 -0
- data/lib/mail_autoconfig.rb +35 -0
- data/mail_autoconfig.gemspec +27 -0
- data/spec/client_config_spec.rb +50 -0
- data/spec/email_address_spec.rb +42 -0
- data/spec/examples/client_config_yahoo.xml +40 -0
- data/spec/server_spec.rb +84 -0
- metadata +416 -0
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--markup=markdown
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mail_autoconfig (0.0.1)
|
5
|
+
faraday
|
6
|
+
nokogiri (~> 1.6)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
diff-lcs (1.2.5)
|
12
|
+
faraday (0.9.0)
|
13
|
+
multipart-post (>= 1.2, < 3)
|
14
|
+
mini_portile (0.5.3)
|
15
|
+
multipart-post (2.0.0)
|
16
|
+
nokogiri (1.6.1)
|
17
|
+
mini_portile (~> 0.5.0)
|
18
|
+
rake (10.3.1)
|
19
|
+
redcarpet (3.1.1)
|
20
|
+
rspec (2.14.1)
|
21
|
+
rspec-core (~> 2.14.0)
|
22
|
+
rspec-expectations (~> 2.14.0)
|
23
|
+
rspec-mocks (~> 2.14.0)
|
24
|
+
rspec-core (2.14.8)
|
25
|
+
rspec-expectations (2.14.5)
|
26
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
27
|
+
rspec-mocks (2.14.6)
|
28
|
+
yard (0.8.7.4)
|
29
|
+
|
30
|
+
PLATFORMS
|
31
|
+
ruby
|
32
|
+
|
33
|
+
DEPENDENCIES
|
34
|
+
bundler (~> 1.5)
|
35
|
+
mail_autoconfig!
|
36
|
+
rake
|
37
|
+
redcarpet
|
38
|
+
rspec (~> 2.14)
|
39
|
+
yard
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Copyright (c) 2014 Dan Wentworth
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
|
25
|
+
Includes the Mozilla ISPDb, which is public domain (http://creativecommons.org/licenses/publicdomain/)
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Mail Autoconfig
|
2
|
+
|
3
|
+
A ruby gem to detect and parse any Thunderbird autoconfig file for a domain. Includes a copy of the Mozilla ISPDB.
|
4
|
+
|
5
|
+
For general information about autoconf visit (https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration),
|
6
|
+
for the autoconfig schema you should have a look at (https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat).
|
7
|
+
|
8
|
+
Although I've tried to keep parsing as accurate as possible, there may be omissions or errors. Please feel free
|
9
|
+
to submit a patch in these cases.
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
gem 'mail_autoconfig'
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install mail_autoconfig
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Generally, you just want to get any associated configuration for an email address. In this case we'll use
|
28
|
+
'example@gmail.com'.
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
client_config = MailAutoconfig::for_address('example@gmail.com')
|
32
|
+
client_config.short_name
|
33
|
+
=> "GMail"
|
34
|
+
outbound_server = client_config.outgoing_servers.first
|
35
|
+
outbound_server.protocol
|
36
|
+
=> "smtp"
|
37
|
+
outnound_server.hostname
|
38
|
+
=> "smtp.googlemail.com"
|
39
|
+
```
|
40
|
+
|
41
|
+
When searching for a configuration, autoconfig first looks to it's local database for the domain of the address,
|
42
|
+
if this fails it will check `http://autoconfig.#{domain}/mail/config-v1.1.xml` and then
|
43
|
+
`http://#{domain}/.well-known/autoconfig/mail/config-v1.1.xml`. If both of these fail, Autoconfig will then look up
|
44
|
+
the MX records for the address, and perform the same searches on the domain of the primary MX record.
|
45
|
+
|
46
|
+
### Updating the database
|
47
|
+
You may wish to update the database at some point to fetch the latest from Mozilla's ISPDB,
|
48
|
+
just run the rake task `rake fetch_ispdb`.
|
49
|
+
|
50
|
+
## Contributing
|
51
|
+
|
52
|
+
1. Fork it ( http://github.com/atech/mail_autoconfig/fork )
|
53
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
54
|
+
2. Run the test suite, check out haven't broken anything (`bundle exec rspec spec`)
|
55
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
56
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
57
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "mail_autoconfig"
|
3
|
+
|
4
|
+
desc "Checkout the latest copy of the mozilla ispdb"
|
5
|
+
task :fetch_ispdb do
|
6
|
+
svn_url = MailAutoconfig.ispdb_svn_url
|
7
|
+
local_path = MailAutoconfig.local_ispdb_path
|
8
|
+
puts "Exporting..."
|
9
|
+
`svn export --force #{svn_url} #{local_path}`
|
10
|
+
`rm #{local_path}/README`
|
11
|
+
end
|
@@ -0,0 +1,1353 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: MailAutoconfig::ClientConfig
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!MailAutoconfig/ClientConfig.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (C)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../MailAutoconfig.html" title="MailAutoconfig (module)">MailAutoconfig</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">ClientConfig</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: MailAutoconfig::ClientConfig
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">MailAutoconfig::ClientConfig</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/mail_autoconfig/client_config.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
<p>Parse the Autoconfig XML file and create a ruby representation</p>
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
<div class="tags">
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
117
|
+
<ul class="summary">
|
118
|
+
|
119
|
+
<li class="public ">
|
120
|
+
<span class="summary_signature">
|
121
|
+
|
122
|
+
<a href="#config-instance_method" title="#config (instance method)">- (Object) <strong>config</strong> </a>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</span>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="note title readonly">readonly</span>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute config.</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<h2>
|
154
|
+
Class Method Summary
|
155
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
156
|
+
</h2>
|
157
|
+
|
158
|
+
<ul class="summary">
|
159
|
+
|
160
|
+
<li class="public ">
|
161
|
+
<span class="summary_signature">
|
162
|
+
|
163
|
+
<a href="#from_file-class_method" title="from_file (class method)">+ (ClientConfig) <strong>from_file</strong>(path) </a>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<span class="summary_desc"><div class='inline'><p>Build a configuration from the specified path.</p>
|
178
|
+
</div></span>
|
179
|
+
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
183
|
+
<li class="public ">
|
184
|
+
<span class="summary_signature">
|
185
|
+
|
186
|
+
<a href="#search-class_method" title="search (class method)">+ (ClientConfig) <strong>search</strong>(domain) </a>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
</span>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'><p>Try to find a configuration for the given domain, locally or remotely.</p>
|
201
|
+
</div></span>
|
202
|
+
|
203
|
+
</li>
|
204
|
+
|
205
|
+
|
206
|
+
<li class="public ">
|
207
|
+
<span class="summary_signature">
|
208
|
+
|
209
|
+
<a href="#search_autoconfig_domain-class_method" title="search_autoconfig_domain (class method)">+ (ClientConfig) <strong>search_autoconfig_domain</strong>(domain) </a>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
</span>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<span class="summary_desc"><div class='inline'><p>Try a remote server for the configuration for the domain.</p>
|
224
|
+
</div></span>
|
225
|
+
|
226
|
+
</li>
|
227
|
+
|
228
|
+
|
229
|
+
<li class="public ">
|
230
|
+
<span class="summary_signature">
|
231
|
+
|
232
|
+
<a href="#search_local_files-class_method" title="search_local_files (class method)">+ (ClientConfig) <strong>search_local_files</strong>(domain) </a>
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
</span>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
<span class="summary_desc"><div class='inline'><p>Search local ISPDB for configurations matching the domain.</p>
|
247
|
+
</div></span>
|
248
|
+
|
249
|
+
</li>
|
250
|
+
|
251
|
+
|
252
|
+
</ul>
|
253
|
+
|
254
|
+
<h2>
|
255
|
+
Instance Method Summary
|
256
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
257
|
+
</h2>
|
258
|
+
|
259
|
+
<ul class="summary">
|
260
|
+
|
261
|
+
<li class="public ">
|
262
|
+
<span class="summary_signature">
|
263
|
+
|
264
|
+
<a href="#domains-instance_method" title="#domains (instance method)">- (Array) <strong>domains</strong> </a>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</span>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
<span class="summary_desc"><div class='inline'><p>A list of domain aliases that this configuration applies to.</p>
|
279
|
+
</div></span>
|
280
|
+
|
281
|
+
</li>
|
282
|
+
|
283
|
+
|
284
|
+
<li class="public ">
|
285
|
+
<span class="summary_signature">
|
286
|
+
|
287
|
+
<a href="#incoming_servers-instance_method" title="#incoming_servers (instance method)">- (Array) <strong>incoming_servers</strong> </a>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
</span>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<span class="summary_desc"><div class='inline'><p>The incoming servers for this configuration.</p>
|
302
|
+
</div></span>
|
303
|
+
|
304
|
+
</li>
|
305
|
+
|
306
|
+
|
307
|
+
<li class="public ">
|
308
|
+
<span class="summary_signature">
|
309
|
+
|
310
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (ClientConfig) <strong>initialize</strong>(client_config_xml) </a>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
</span>
|
315
|
+
|
316
|
+
|
317
|
+
<span class="note title constructor">constructor</span>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
<span class="summary_desc"><div class='inline'><p>A new instance of ClientConfig.</p>
|
327
|
+
</div></span>
|
328
|
+
|
329
|
+
</li>
|
330
|
+
|
331
|
+
|
332
|
+
<li class="public ">
|
333
|
+
<span class="summary_signature">
|
334
|
+
|
335
|
+
<a href="#name-instance_method" title="#name (instance method)">- (String) <strong>name</strong> </a>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
</span>
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
<span class="summary_desc"><div class='inline'><p>The full name of this service (e.g. Google Mail).</p>
|
350
|
+
</div></span>
|
351
|
+
|
352
|
+
</li>
|
353
|
+
|
354
|
+
|
355
|
+
<li class="public ">
|
356
|
+
<span class="summary_signature">
|
357
|
+
|
358
|
+
<a href="#outgoing_servers-instance_method" title="#outgoing_servers (instance method)">- (Array) <strong>outgoing_servers</strong> </a>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
</span>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
<span class="summary_desc"><div class='inline'><p>The outgoing servers for this configuration.</p>
|
373
|
+
</div></span>
|
374
|
+
|
375
|
+
</li>
|
376
|
+
|
377
|
+
|
378
|
+
<li class="public ">
|
379
|
+
<span class="summary_signature">
|
380
|
+
|
381
|
+
<a href="#provider_id-instance_method" title="#provider_id (instance method)">- (String) <strong>provider_id</strong> </a>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
</span>
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
<span class="summary_desc"><div class='inline'><p>The unique string identifying this service (e.g. googlemail.com).</p>
|
396
|
+
</div></span>
|
397
|
+
|
398
|
+
</li>
|
399
|
+
|
400
|
+
|
401
|
+
<li class="public ">
|
402
|
+
<span class="summary_signature">
|
403
|
+
|
404
|
+
<a href="#short_name-instance_method" title="#short_name (instance method)">- (String) <strong>short_name</strong> </a>
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
</span>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
<span class="summary_desc"><div class='inline'><p>The short name of this service (e.g. GMail).</p>
|
419
|
+
</div></span>
|
420
|
+
|
421
|
+
</li>
|
422
|
+
|
423
|
+
|
424
|
+
<li class="public ">
|
425
|
+
<span class="summary_signature">
|
426
|
+
|
427
|
+
<a href="#valid_for_domain%3F-instance_method" title="#valid_for_domain? (instance method)">- (Boolean) <strong>valid_for_domain?</strong>(domain) </a>
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
</span>
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
<span class="summary_desc"><div class='inline'><p>Does this configuration file apply to the specified domain?.</p>
|
442
|
+
</div></span>
|
443
|
+
|
444
|
+
</li>
|
445
|
+
|
446
|
+
|
447
|
+
</ul>
|
448
|
+
|
449
|
+
|
450
|
+
<div id="constructor_details" class="method_details_list">
|
451
|
+
<h2>Constructor Details</h2>
|
452
|
+
|
453
|
+
<div class="method_details first">
|
454
|
+
<h3 class="signature first" id="initialize-instance_method">
|
455
|
+
|
456
|
+
- (<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>) <strong>initialize</strong>(client_config_xml)
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
</h3><div class="docstring">
|
463
|
+
<div class="discussion">
|
464
|
+
<p>Returns a new instance of ClientConfig</p>
|
465
|
+
|
466
|
+
|
467
|
+
</div>
|
468
|
+
</div>
|
469
|
+
<div class="tags">
|
470
|
+
<p class="tag_title">Parameters:</p>
|
471
|
+
<ul class="param">
|
472
|
+
|
473
|
+
<li>
|
474
|
+
|
475
|
+
<span class='name'>client_config_xml</span>
|
476
|
+
|
477
|
+
|
478
|
+
<span class='type'>(<tt>String</tt>)</span>
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
—
|
483
|
+
<div class='inline'><p>the raw XML to build the ClientConfig from.</p>
|
484
|
+
</div>
|
485
|
+
|
486
|
+
</li>
|
487
|
+
|
488
|
+
</ul>
|
489
|
+
|
490
|
+
|
491
|
+
</div><table class="source_code">
|
492
|
+
<tr>
|
493
|
+
<td>
|
494
|
+
<pre class="lines">
|
495
|
+
|
496
|
+
|
497
|
+
59
|
498
|
+
60
|
499
|
+
61</pre>
|
500
|
+
</td>
|
501
|
+
<td>
|
502
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 59</span>
|
503
|
+
|
504
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client_config_xml'>client_config_xml</span><span class='rparen'>)</span>
|
505
|
+
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='const'>Nokogiri</span><span class='op'>::</span><span class='const'>XML</span><span class='lparen'>(</span><span class='id identifier rubyid_client_config_xml'>client_config_xml</span><span class='rparen'>)</span>
|
506
|
+
<span class='kw'>end</span></pre>
|
507
|
+
</td>
|
508
|
+
</tr>
|
509
|
+
</table>
|
510
|
+
</div>
|
511
|
+
|
512
|
+
</div>
|
513
|
+
|
514
|
+
<div id="instance_attr_details" class="attr_details">
|
515
|
+
<h2>Instance Attribute Details</h2>
|
516
|
+
|
517
|
+
|
518
|
+
<span id=""></span>
|
519
|
+
<div class="method_details first">
|
520
|
+
<h3 class="signature first" id="config-instance_method">
|
521
|
+
|
522
|
+
- (<tt>Object</tt>) <strong>config</strong> <span class="extras">(readonly)</span>
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
</h3><div class="docstring">
|
529
|
+
<div class="discussion">
|
530
|
+
<p>Returns the value of attribute config</p>
|
531
|
+
|
532
|
+
|
533
|
+
</div>
|
534
|
+
</div>
|
535
|
+
<div class="tags">
|
536
|
+
|
537
|
+
|
538
|
+
</div><table class="source_code">
|
539
|
+
<tr>
|
540
|
+
<td>
|
541
|
+
<pre class="lines">
|
542
|
+
|
543
|
+
|
544
|
+
6
|
545
|
+
7
|
546
|
+
8</pre>
|
547
|
+
</td>
|
548
|
+
<td>
|
549
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 6</span>
|
550
|
+
|
551
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
|
552
|
+
<span class='ivar'>@config</span>
|
553
|
+
<span class='kw'>end</span></pre>
|
554
|
+
</td>
|
555
|
+
</tr>
|
556
|
+
</table>
|
557
|
+
</div>
|
558
|
+
|
559
|
+
</div>
|
560
|
+
|
561
|
+
|
562
|
+
<div id="class_method_details" class="method_details_list">
|
563
|
+
<h2>Class Method Details</h2>
|
564
|
+
|
565
|
+
|
566
|
+
<div class="method_details first">
|
567
|
+
<h3 class="signature first" id="from_file-class_method">
|
568
|
+
|
569
|
+
+ (<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>) <strong>from_file</strong>(path)
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
</h3><div class="docstring">
|
576
|
+
<div class="discussion">
|
577
|
+
<p>Build a configuration from the specified path</p>
|
578
|
+
|
579
|
+
|
580
|
+
</div>
|
581
|
+
</div>
|
582
|
+
<div class="tags">
|
583
|
+
<p class="tag_title">Parameters:</p>
|
584
|
+
<ul class="param">
|
585
|
+
|
586
|
+
<li>
|
587
|
+
|
588
|
+
<span class='name'>path</span>
|
589
|
+
|
590
|
+
|
591
|
+
<span class='type'>(<tt>String</tt>)</span>
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
—
|
596
|
+
<div class='inline'><p>the loction of the client configuartion file</p>
|
597
|
+
</div>
|
598
|
+
|
599
|
+
</li>
|
600
|
+
|
601
|
+
</ul>
|
602
|
+
|
603
|
+
<p class="tag_title">Returns:</p>
|
604
|
+
<ul class="return">
|
605
|
+
|
606
|
+
<li>
|
607
|
+
|
608
|
+
|
609
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>)</span>
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
—
|
614
|
+
<div class='inline'><p>new client configuration</p>
|
615
|
+
</div>
|
616
|
+
|
617
|
+
</li>
|
618
|
+
|
619
|
+
</ul>
|
620
|
+
|
621
|
+
</div><table class="source_code">
|
622
|
+
<tr>
|
623
|
+
<td>
|
624
|
+
<pre class="lines">
|
625
|
+
|
626
|
+
|
627
|
+
12
|
628
|
+
13
|
629
|
+
14</pre>
|
630
|
+
</td>
|
631
|
+
<td>
|
632
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 12</span>
|
633
|
+
|
634
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_from_file'>from_file</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
635
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
636
|
+
<span class='kw'>end</span></pre>
|
637
|
+
</td>
|
638
|
+
</tr>
|
639
|
+
</table>
|
640
|
+
</div>
|
641
|
+
|
642
|
+
<div class="method_details ">
|
643
|
+
<h3 class="signature " id="search-class_method">
|
644
|
+
|
645
|
+
+ (<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>) <strong>search</strong>(domain)
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
</h3><div class="docstring">
|
652
|
+
<div class="discussion">
|
653
|
+
<p>Try to find a configuration for the given domain, locally or remotely</p>
|
654
|
+
|
655
|
+
|
656
|
+
</div>
|
657
|
+
</div>
|
658
|
+
<div class="tags">
|
659
|
+
<p class="tag_title">Parameters:</p>
|
660
|
+
<ul class="param">
|
661
|
+
|
662
|
+
<li>
|
663
|
+
|
664
|
+
<span class='name'>domain</span>
|
665
|
+
|
666
|
+
|
667
|
+
<span class='type'>(<tt>String</tt>)</span>
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
—
|
672
|
+
<div class='inline'><p>the domain to lookup the configuration for</p>
|
673
|
+
</div>
|
674
|
+
|
675
|
+
</li>
|
676
|
+
|
677
|
+
</ul>
|
678
|
+
|
679
|
+
<p class="tag_title">Returns:</p>
|
680
|
+
<ul class="return">
|
681
|
+
|
682
|
+
<li>
|
683
|
+
|
684
|
+
|
685
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>)</span>
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
—
|
690
|
+
<div class='inline'><p>client configuration for the domain</p>
|
691
|
+
</div>
|
692
|
+
|
693
|
+
</li>
|
694
|
+
|
695
|
+
</ul>
|
696
|
+
|
697
|
+
</div><table class="source_code">
|
698
|
+
<tr>
|
699
|
+
<td>
|
700
|
+
<pre class="lines">
|
701
|
+
|
702
|
+
|
703
|
+
19
|
704
|
+
20
|
705
|
+
21</pre>
|
706
|
+
</td>
|
707
|
+
<td>
|
708
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 19</span>
|
709
|
+
|
710
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span>
|
711
|
+
<span class='id identifier rubyid_search_local_files'>search_local_files</span><span class='lparen'>(</span><span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_search_autoconfig_domain'>search_autoconfig_domain</span><span class='lparen'>(</span><span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span>
|
712
|
+
<span class='kw'>end</span></pre>
|
713
|
+
</td>
|
714
|
+
</tr>
|
715
|
+
</table>
|
716
|
+
</div>
|
717
|
+
|
718
|
+
<div class="method_details ">
|
719
|
+
<h3 class="signature " id="search_autoconfig_domain-class_method">
|
720
|
+
|
721
|
+
+ (<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>) <strong>search_autoconfig_domain</strong>(domain)
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
</h3><div class="docstring">
|
728
|
+
<div class="discussion">
|
729
|
+
<p>Try a remote server for the configuration for the domain.
|
730
|
+
Search <code>http://autoconfig.#{domain}/mail/config-v1.1.xml</code> first,
|
731
|
+
followed by <code>http://#{domain}/.well-known/autoconfig/mail/config-v1.1.xml</code></p>
|
732
|
+
|
733
|
+
|
734
|
+
</div>
|
735
|
+
</div>
|
736
|
+
<div class="tags">
|
737
|
+
<p class="tag_title">Parameters:</p>
|
738
|
+
<ul class="param">
|
739
|
+
|
740
|
+
<li>
|
741
|
+
|
742
|
+
<span class='name'>domain</span>
|
743
|
+
|
744
|
+
|
745
|
+
<span class='type'>(<tt>String</tt>)</span>
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
—
|
750
|
+
<div class='inline'><p>the domain to look for</p>
|
751
|
+
</div>
|
752
|
+
|
753
|
+
</li>
|
754
|
+
|
755
|
+
</ul>
|
756
|
+
|
757
|
+
<p class="tag_title">Returns:</p>
|
758
|
+
<ul class="return">
|
759
|
+
|
760
|
+
<li>
|
761
|
+
|
762
|
+
|
763
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>)</span>
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
—
|
768
|
+
<div class='inline'><p>the client configuration for the domain</p>
|
769
|
+
</div>
|
770
|
+
|
771
|
+
</li>
|
772
|
+
|
773
|
+
</ul>
|
774
|
+
|
775
|
+
</div><table class="source_code">
|
776
|
+
<tr>
|
777
|
+
<td>
|
778
|
+
<pre class="lines">
|
779
|
+
|
780
|
+
|
781
|
+
40
|
782
|
+
41
|
783
|
+
42
|
784
|
+
43
|
785
|
+
44
|
786
|
+
45
|
787
|
+
46
|
788
|
+
47
|
789
|
+
48
|
790
|
+
49
|
791
|
+
50
|
792
|
+
51
|
793
|
+
52
|
794
|
+
53
|
795
|
+
54
|
796
|
+
55</pre>
|
797
|
+
</td>
|
798
|
+
<td>
|
799
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 40</span>
|
800
|
+
|
801
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_search_autoconfig_domain'>search_autoconfig_domain</span><span class='lparen'>(</span><span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span>
|
802
|
+
<span class='id identifier rubyid_last_config'>last_config</span> <span class='op'>=</span> <span class='kw'>false</span>
|
803
|
+
<span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>http://autoconfig.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_domain'>domain</span><span class='rbrace'>}</span><span class='tstring_content'>/mail/config-v1.1.xml</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>http://</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_domain'>domain</span><span class='rbrace'>}</span><span class='tstring_content'>/.well-known/autoconfig/mail/config-v1.1.xml</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_url'>url</span><span class='op'>|</span>
|
804
|
+
<span class='kw'>begin</span>
|
805
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>Faraday</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
806
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>200</span>
|
807
|
+
<span class='id identifier rubyid_last_config'>last_config</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
|
808
|
+
<span class='kw'>else</span>
|
809
|
+
<span class='kw'>false</span>
|
810
|
+
<span class='kw'>end</span>
|
811
|
+
<span class='kw'>rescue</span>
|
812
|
+
<span class='kw'>false</span>
|
813
|
+
<span class='kw'>end</span>
|
814
|
+
<span class='kw'>end</span>
|
815
|
+
<span class='id identifier rubyid_match'>match</span> <span class='op'>?</span> <span class='id identifier rubyid_last_config'>last_config</span> <span class='op'>:</span> <span class='kw'>false</span>
|
816
|
+
<span class='kw'>end</span></pre>
|
817
|
+
</td>
|
818
|
+
</tr>
|
819
|
+
</table>
|
820
|
+
</div>
|
821
|
+
|
822
|
+
<div class="method_details ">
|
823
|
+
<h3 class="signature " id="search_local_files-class_method">
|
824
|
+
|
825
|
+
+ (<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>) <strong>search_local_files</strong>(domain)
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
</h3><div class="docstring">
|
832
|
+
<div class="discussion">
|
833
|
+
<p>Search local ISPDB for configurations matching the domain</p>
|
834
|
+
|
835
|
+
|
836
|
+
</div>
|
837
|
+
</div>
|
838
|
+
<div class="tags">
|
839
|
+
<p class="tag_title">Parameters:</p>
|
840
|
+
<ul class="param">
|
841
|
+
|
842
|
+
<li>
|
843
|
+
|
844
|
+
<span class='name'>domain</span>
|
845
|
+
|
846
|
+
|
847
|
+
<span class='type'>(<tt>String</tt>)</span>
|
848
|
+
|
849
|
+
|
850
|
+
|
851
|
+
—
|
852
|
+
<div class='inline'><p>the domain to look for</p>
|
853
|
+
</div>
|
854
|
+
|
855
|
+
</li>
|
856
|
+
|
857
|
+
</ul>
|
858
|
+
|
859
|
+
<p class="tag_title">Returns:</p>
|
860
|
+
<ul class="return">
|
861
|
+
|
862
|
+
<li>
|
863
|
+
|
864
|
+
|
865
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MailAutoconfig::ClientConfig (class)">ClientConfig</a></span></tt>)</span>
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
—
|
870
|
+
<div class='inline'><p>client configuration for the domain</p>
|
871
|
+
</div>
|
872
|
+
|
873
|
+
</li>
|
874
|
+
|
875
|
+
</ul>
|
876
|
+
|
877
|
+
</div><table class="source_code">
|
878
|
+
<tr>
|
879
|
+
<td>
|
880
|
+
<pre class="lines">
|
881
|
+
|
882
|
+
|
883
|
+
26
|
884
|
+
27
|
885
|
+
28
|
886
|
+
29
|
887
|
+
30
|
888
|
+
31
|
889
|
+
32
|
890
|
+
33</pre>
|
891
|
+
</td>
|
892
|
+
<td>
|
893
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 26</span>
|
894
|
+
|
895
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_search_local_files'>search_local_files</span><span class='lparen'>(</span><span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span>
|
896
|
+
<span class='id identifier rubyid_last_config'>last_config</span> <span class='op'>=</span> <span class='kw'>false</span>
|
897
|
+
<span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>MailAutoconfig</span><span class='period'>.</span><span class='id identifier rubyid_local_ispdb_path'>local_ispdb_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_config_file'>config_file</span><span class='op'>|</span>
|
898
|
+
<span class='id identifier rubyid_last_config'>last_config</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_file'>from_file</span><span class='lparen'>(</span><span class='id identifier rubyid_config_file'>config_file</span><span class='rparen'>)</span>
|
899
|
+
<span class='id identifier rubyid_last_config'>last_config</span><span class='period'>.</span><span class='id identifier rubyid_valid_for_domain?'>valid_for_domain?</span><span class='lparen'>(</span><span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span>
|
900
|
+
<span class='kw'>end</span>
|
901
|
+
<span class='id identifier rubyid_match'>match</span> <span class='op'>?</span> <span class='id identifier rubyid_last_config'>last_config</span> <span class='op'>:</span> <span class='kw'>false</span>
|
902
|
+
<span class='kw'>end</span></pre>
|
903
|
+
</td>
|
904
|
+
</tr>
|
905
|
+
</table>
|
906
|
+
</div>
|
907
|
+
|
908
|
+
</div>
|
909
|
+
|
910
|
+
<div id="instance_method_details" class="method_details_list">
|
911
|
+
<h2>Instance Method Details</h2>
|
912
|
+
|
913
|
+
|
914
|
+
<div class="method_details first">
|
915
|
+
<h3 class="signature first" id="domains-instance_method">
|
916
|
+
|
917
|
+
- (<tt>Array</tt>) <strong>domains</strong>
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
</h3><div class="docstring">
|
924
|
+
<div class="discussion">
|
925
|
+
<p>A list of domain aliases that this configuration applies to</p>
|
926
|
+
|
927
|
+
|
928
|
+
</div>
|
929
|
+
</div>
|
930
|
+
<div class="tags">
|
931
|
+
|
932
|
+
<p class="tag_title">Returns:</p>
|
933
|
+
<ul class="return">
|
934
|
+
|
935
|
+
<li>
|
936
|
+
|
937
|
+
|
938
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
—
|
943
|
+
<div class='inline'><p>list of domains for this configuration</p>
|
944
|
+
</div>
|
945
|
+
|
946
|
+
</li>
|
947
|
+
|
948
|
+
</ul>
|
949
|
+
|
950
|
+
</div><table class="source_code">
|
951
|
+
<tr>
|
952
|
+
<td>
|
953
|
+
<pre class="lines">
|
954
|
+
|
955
|
+
|
956
|
+
65
|
957
|
+
66
|
958
|
+
67</pre>
|
959
|
+
</td>
|
960
|
+
<td>
|
961
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 65</span>
|
962
|
+
|
963
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_domains'>domains</span>
|
964
|
+
<span class='ivar'>@domains</span> <span class='op'>||=</span> <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>domain</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_domain'>domain</span><span class='op'>|</span> <span class='id identifier rubyid_domain'>domain</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span> <span class='rbrace'>}</span>
|
965
|
+
<span class='kw'>end</span></pre>
|
966
|
+
</td>
|
967
|
+
</tr>
|
968
|
+
</table>
|
969
|
+
</div>
|
970
|
+
|
971
|
+
<div class="method_details ">
|
972
|
+
<h3 class="signature " id="incoming_servers-instance_method">
|
973
|
+
|
974
|
+
- (<tt>Array</tt>) <strong>incoming_servers</strong>
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
|
979
|
+
|
980
|
+
</h3><div class="docstring">
|
981
|
+
<div class="discussion">
|
982
|
+
<p>The incoming servers for this configuration. There can be multiple servers per
|
983
|
+
configuration e.g. for IMAP and POP3, ordered in list of preference.</p>
|
984
|
+
|
985
|
+
|
986
|
+
</div>
|
987
|
+
</div>
|
988
|
+
<div class="tags">
|
989
|
+
|
990
|
+
<p class="tag_title">Returns:</p>
|
991
|
+
<ul class="return">
|
992
|
+
|
993
|
+
<li>
|
994
|
+
|
995
|
+
|
996
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
—
|
1001
|
+
<div class='inline'><p>list of incoming servers</p>
|
1002
|
+
</div>
|
1003
|
+
|
1004
|
+
</li>
|
1005
|
+
|
1006
|
+
</ul>
|
1007
|
+
|
1008
|
+
</div><table class="source_code">
|
1009
|
+
<tr>
|
1010
|
+
<td>
|
1011
|
+
<pre class="lines">
|
1012
|
+
|
1013
|
+
|
1014
|
+
94
|
1015
|
+
95
|
1016
|
+
96
|
1017
|
+
97
|
1018
|
+
98</pre>
|
1019
|
+
</td>
|
1020
|
+
<td>
|
1021
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 94</span>
|
1022
|
+
|
1023
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_incoming_servers'>incoming_servers</span>
|
1024
|
+
<span class='ivar'>@incoming_servers</span> <span class='op'>||=</span> <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>incomingServer</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_incoming'>incoming</span><span class='op'>|</span>
|
1025
|
+
<span class='const'>MailAutoconfig</span><span class='op'>::</span><span class='const'>IncomingServer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_incoming'>incoming</span><span class='rparen'>)</span>
|
1026
|
+
<span class='kw'>end</span>
|
1027
|
+
<span class='kw'>end</span></pre>
|
1028
|
+
</td>
|
1029
|
+
</tr>
|
1030
|
+
</table>
|
1031
|
+
</div>
|
1032
|
+
|
1033
|
+
<div class="method_details ">
|
1034
|
+
<h3 class="signature " id="name-instance_method">
|
1035
|
+
|
1036
|
+
- (<tt>String</tt>) <strong>name</strong>
|
1037
|
+
|
1038
|
+
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
</h3><div class="docstring">
|
1043
|
+
<div class="discussion">
|
1044
|
+
<p>Returns the full name of this service (e.g. Google Mail)</p>
|
1045
|
+
|
1046
|
+
|
1047
|
+
</div>
|
1048
|
+
</div>
|
1049
|
+
<div class="tags">
|
1050
|
+
|
1051
|
+
<p class="tag_title">Returns:</p>
|
1052
|
+
<ul class="return">
|
1053
|
+
|
1054
|
+
<li>
|
1055
|
+
|
1056
|
+
|
1057
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1058
|
+
|
1059
|
+
|
1060
|
+
|
1061
|
+
—
|
1062
|
+
<div class='inline'><p>the full name of this service (e.g. Google Mail)</p>
|
1063
|
+
</div>
|
1064
|
+
|
1065
|
+
</li>
|
1066
|
+
|
1067
|
+
</ul>
|
1068
|
+
|
1069
|
+
</div><table class="source_code">
|
1070
|
+
<tr>
|
1071
|
+
<td>
|
1072
|
+
<pre class="lines">
|
1073
|
+
|
1074
|
+
|
1075
|
+
82
|
1076
|
+
83
|
1077
|
+
84</pre>
|
1078
|
+
</td>
|
1079
|
+
<td>
|
1080
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 82</span>
|
1081
|
+
|
1082
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
1083
|
+
<span class='ivar'>@name</span> <span class='op'>||=</span> <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>displayName</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span>
|
1084
|
+
<span class='kw'>end</span></pre>
|
1085
|
+
</td>
|
1086
|
+
</tr>
|
1087
|
+
</table>
|
1088
|
+
</div>
|
1089
|
+
|
1090
|
+
<div class="method_details ">
|
1091
|
+
<h3 class="signature " id="outgoing_servers-instance_method">
|
1092
|
+
|
1093
|
+
- (<tt>Array</tt>) <strong>outgoing_servers</strong>
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1098
|
+
|
1099
|
+
</h3><div class="docstring">
|
1100
|
+
<div class="discussion">
|
1101
|
+
<p>The outgoing servers for this configuration. There can be multiple servers per
|
1102
|
+
configuration, ordered in list of preference.</p>
|
1103
|
+
|
1104
|
+
|
1105
|
+
</div>
|
1106
|
+
</div>
|
1107
|
+
<div class="tags">
|
1108
|
+
|
1109
|
+
<p class="tag_title">Returns:</p>
|
1110
|
+
<ul class="return">
|
1111
|
+
|
1112
|
+
<li>
|
1113
|
+
|
1114
|
+
|
1115
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
1116
|
+
|
1117
|
+
|
1118
|
+
|
1119
|
+
—
|
1120
|
+
<div class='inline'><p>list of outgoing servers</p>
|
1121
|
+
</div>
|
1122
|
+
|
1123
|
+
</li>
|
1124
|
+
|
1125
|
+
</ul>
|
1126
|
+
|
1127
|
+
</div><table class="source_code">
|
1128
|
+
<tr>
|
1129
|
+
<td>
|
1130
|
+
<pre class="lines">
|
1131
|
+
|
1132
|
+
|
1133
|
+
103
|
1134
|
+
104
|
1135
|
+
105
|
1136
|
+
106
|
1137
|
+
107</pre>
|
1138
|
+
</td>
|
1139
|
+
<td>
|
1140
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 103</span>
|
1141
|
+
|
1142
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_outgoing_servers'>outgoing_servers</span>
|
1143
|
+
<span class='ivar'>@outgoing_servers</span> <span class='op'>||=</span> <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>outgoingServer</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_outgoing'>outgoing</span><span class='op'>|</span>
|
1144
|
+
<span class='const'>MailAutoconfig</span><span class='op'>::</span><span class='const'>OutgoingServer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_outgoing'>outgoing</span><span class='rparen'>)</span>
|
1145
|
+
<span class='kw'>end</span>
|
1146
|
+
<span class='kw'>end</span></pre>
|
1147
|
+
</td>
|
1148
|
+
</tr>
|
1149
|
+
</table>
|
1150
|
+
</div>
|
1151
|
+
|
1152
|
+
<div class="method_details ">
|
1153
|
+
<h3 class="signature " id="provider_id-instance_method">
|
1154
|
+
|
1155
|
+
- (<tt>String</tt>) <strong>provider_id</strong>
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
</h3><div class="docstring">
|
1162
|
+
<div class="discussion">
|
1163
|
+
<p>Returns The unique string identifying this service (e.g. googlemail.com)</p>
|
1164
|
+
|
1165
|
+
|
1166
|
+
</div>
|
1167
|
+
</div>
|
1168
|
+
<div class="tags">
|
1169
|
+
|
1170
|
+
<p class="tag_title">Returns:</p>
|
1171
|
+
<ul class="return">
|
1172
|
+
|
1173
|
+
<li>
|
1174
|
+
|
1175
|
+
|
1176
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1177
|
+
|
1178
|
+
|
1179
|
+
|
1180
|
+
—
|
1181
|
+
<div class='inline'><p>The unique string identifying this service (e.g. googlemail.com)</p>
|
1182
|
+
</div>
|
1183
|
+
|
1184
|
+
</li>
|
1185
|
+
|
1186
|
+
</ul>
|
1187
|
+
|
1188
|
+
</div><table class="source_code">
|
1189
|
+
<tr>
|
1190
|
+
<td>
|
1191
|
+
<pre class="lines">
|
1192
|
+
|
1193
|
+
|
1194
|
+
77
|
1195
|
+
78
|
1196
|
+
79</pre>
|
1197
|
+
</td>
|
1198
|
+
<td>
|
1199
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 77</span>
|
1200
|
+
|
1201
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_provider_id'>provider_id</span>
|
1202
|
+
<span class='ivar'>@provider_id</span> <span class='op'>||=</span> <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_attr'>attr</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
1203
|
+
<span class='kw'>end</span></pre>
|
1204
|
+
</td>
|
1205
|
+
</tr>
|
1206
|
+
</table>
|
1207
|
+
</div>
|
1208
|
+
|
1209
|
+
<div class="method_details ">
|
1210
|
+
<h3 class="signature " id="short_name-instance_method">
|
1211
|
+
|
1212
|
+
- (<tt>String</tt>) <strong>short_name</strong>
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
|
1217
|
+
|
1218
|
+
</h3><div class="docstring">
|
1219
|
+
<div class="discussion">
|
1220
|
+
<p>Returns the short name of this service (e.g. GMail)</p>
|
1221
|
+
|
1222
|
+
|
1223
|
+
</div>
|
1224
|
+
</div>
|
1225
|
+
<div class="tags">
|
1226
|
+
|
1227
|
+
<p class="tag_title">Returns:</p>
|
1228
|
+
<ul class="return">
|
1229
|
+
|
1230
|
+
<li>
|
1231
|
+
|
1232
|
+
|
1233
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1234
|
+
|
1235
|
+
|
1236
|
+
|
1237
|
+
—
|
1238
|
+
<div class='inline'><p>the short name of this service (e.g. GMail)</p>
|
1239
|
+
</div>
|
1240
|
+
|
1241
|
+
</li>
|
1242
|
+
|
1243
|
+
</ul>
|
1244
|
+
|
1245
|
+
</div><table class="source_code">
|
1246
|
+
<tr>
|
1247
|
+
<td>
|
1248
|
+
<pre class="lines">
|
1249
|
+
|
1250
|
+
|
1251
|
+
87
|
1252
|
+
88
|
1253
|
+
89</pre>
|
1254
|
+
</td>
|
1255
|
+
<td>
|
1256
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 87</span>
|
1257
|
+
|
1258
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_short_name'>short_name</span>
|
1259
|
+
<span class='ivar'>@short_name</span> <span class='op'>||=</span> <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>displayShortName</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span>
|
1260
|
+
<span class='kw'>end</span></pre>
|
1261
|
+
</td>
|
1262
|
+
</tr>
|
1263
|
+
</table>
|
1264
|
+
</div>
|
1265
|
+
|
1266
|
+
<div class="method_details ">
|
1267
|
+
<h3 class="signature " id="valid_for_domain?-instance_method">
|
1268
|
+
|
1269
|
+
- (<tt>Boolean</tt>) <strong>valid_for_domain?</strong>(domain)
|
1270
|
+
|
1271
|
+
|
1272
|
+
|
1273
|
+
|
1274
|
+
|
1275
|
+
</h3><div class="docstring">
|
1276
|
+
<div class="discussion">
|
1277
|
+
<p>Does this configuration file apply to the specified domain?</p>
|
1278
|
+
|
1279
|
+
|
1280
|
+
</div>
|
1281
|
+
</div>
|
1282
|
+
<div class="tags">
|
1283
|
+
<p class="tag_title">Parameters:</p>
|
1284
|
+
<ul class="param">
|
1285
|
+
|
1286
|
+
<li>
|
1287
|
+
|
1288
|
+
<span class='name'>domain</span>
|
1289
|
+
|
1290
|
+
|
1291
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1292
|
+
|
1293
|
+
|
1294
|
+
|
1295
|
+
—
|
1296
|
+
<div class='inline'><p>the domain to check</p>
|
1297
|
+
</div>
|
1298
|
+
|
1299
|
+
</li>
|
1300
|
+
|
1301
|
+
</ul>
|
1302
|
+
|
1303
|
+
<p class="tag_title">Returns:</p>
|
1304
|
+
<ul class="return">
|
1305
|
+
|
1306
|
+
<li>
|
1307
|
+
|
1308
|
+
|
1309
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1310
|
+
|
1311
|
+
|
1312
|
+
|
1313
|
+
—
|
1314
|
+
<div class='inline'><p>Does the domain match?</p>
|
1315
|
+
</div>
|
1316
|
+
|
1317
|
+
</li>
|
1318
|
+
|
1319
|
+
</ul>
|
1320
|
+
|
1321
|
+
</div><table class="source_code">
|
1322
|
+
<tr>
|
1323
|
+
<td>
|
1324
|
+
<pre class="lines">
|
1325
|
+
|
1326
|
+
|
1327
|
+
72
|
1328
|
+
73
|
1329
|
+
74</pre>
|
1330
|
+
</td>
|
1331
|
+
<td>
|
1332
|
+
<pre class="code"><span class="info file"># File 'lib/mail_autoconfig/client_config.rb', line 72</span>
|
1333
|
+
|
1334
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_valid_for_domain?'>valid_for_domain?</span><span class='lparen'>(</span><span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span>
|
1335
|
+
<span class='id identifier rubyid_domains'>domains</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_d'>d</span><span class='op'>|</span> <span class='id identifier rubyid_d'>d</span> <span class='op'>==</span> <span class='id identifier rubyid_domain'>domain</span><span class='rbrace'>}</span>
|
1336
|
+
<span class='kw'>end</span></pre>
|
1337
|
+
</td>
|
1338
|
+
</tr>
|
1339
|
+
</table>
|
1340
|
+
</div>
|
1341
|
+
|
1342
|
+
</div>
|
1343
|
+
|
1344
|
+
</div>
|
1345
|
+
|
1346
|
+
<div id="footer">
|
1347
|
+
Generated on Tue Apr 22 22:04:36 2014 by
|
1348
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1349
|
+
0.8.7.4 (ruby-1.9.3).
|
1350
|
+
</div>
|
1351
|
+
|
1352
|
+
</body>
|
1353
|
+
</html>
|