diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-15 03:34:59 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-15 03:34:59 +0000 |
commit | a7d98b7bc323f5915bab6a1984989e60f5686584 (patch) | |
tree | 6d2e04619f8b0a63b0e53cd456415215fc3f170a /doc/net/pop.rd.ja | |
parent | 0ef2cab2f23d098152b745da3791bf47301b5ed6 (diff) |
aamine
* lib/net/protocol.rb: Protocol#start returns the return value of block.
* lib/net/protocol.rb: set timeout limit by default.
* lib/net/protocol.rb: new methods WriteAdapter#write, puts, print, printf.
* lib/net/protocol.rb: change template method scheme.
* lib/net/http.rb: rename HTTP#get2 to request_get, post2 to request_post ...
* lib/net/pop.rb: POP#auth_only did not work.
* lib/net/smtp.rb: should not resolve HELO domain automatically.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/net/pop.rd.ja')
-rw-r--r-- | doc/net/pop.rd.ja | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/doc/net/pop.rd.ja b/doc/net/pop.rd.ja index 67510183b1..2c7e22f29f 100644 --- a/doc/net/pop.rd.ja +++ b/doc/net/pop.rd.ja @@ -1,6 +1,6 @@ =begin -= net/pop.rb version 1.1.37 += net/pop.rb == このライブラリについて @@ -120,27 +120,21 @@ POP3#delete_all を使うとさらに #each_mail と m.delete を === APOP -APOP 認証を使うには -(1) POP3 クラスのかわりに APOP クラスを使う -(2) POP3.start の第五引数に true を渡す -の二通りの方法があります。 +Net::POP3 クラスのかわりに Net::APOP クラスを使うと、認証時に APOP を +使うようになります。また動的にノーマル POP と APOP を選択するには、 +以下のように Net::POP3.APOP() メソッドを使うのが便利です。 - # (1) require 'net/pop' - Net::APOP.start( 'apop.server.address', 110, - 'YourAccount', 'YourPassword' ) {|pop| - # Rest code is same. - } - # (2) - require 'net/pop' - Net::POP3.start( 'apop.server.address', 110, - 'YourAccount', 'YourPassword', - true #### - ) {|pop| + # use APOP authentication if $isapop == true + pop = Net::POP3.APOP($isapop).new( 'apop.server.address', 110 ) + pop.start( YourAccount', 'YourPassword' ) {|pop| # Rest code is same. } +この方法はクラス自体を変えるので、クラスメソッドの start や foreach、 +delete_all、auth_only なども APOP とともに使えます。 + == Net::POP3 class === クラスメソッド @@ -162,6 +156,18 @@ APOP 認証を使うには end } +: APOP( is_apop ) + bool が真なら Net::APOP クラス、偽なら Net::POP3 クラスを返します。 + 以下の例のように使ってください。 + + # example 1 + pop = Net::POP3::APOP($isapop).new( addr, port ) + + # example 2 + Net::POP3::APOP($isapop).start( addr, port ) {|pop| + .... + } + : foreach( address, port = 110, account, password ) {|mail| .... } POP セッションを開き、サーバ上のすべてのメールに対して繰り返します。 以下と同じです。 |