るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.038秒)
トップページ > バージョン:2.3.0[x] > クエリ:new[x] > クラス:Net::POP3[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

キーワード

検索結果

Net::POP3.new(address, port = nil, apop = false) -> Net::POP3 (54307.0)

Net::POP3 オブジェクトを生成します。

...Net::POP3 オブジェクトを生成します。

このメソッドではサーバの接続は行いません。
apop が真のときは APOP 認証を行うオブジェクトを生成します。

port に nil を渡すと、適当なポート(通常は110、SSL利用時には 995)を
使いま...
...す。

@param address POP3サーバのホスト名文字列
@param port 接続するPOP3サーバのポート番号
@param apop 真の場合にはAPOPで認証します

@see Net::POP3#start...

Net::POP3#auth_only(account, password) -> () (22.0)

POP セッションを開き、認証だけを行って接続を切ります。

...けを行って接続を切ります。

主に POP before SMTP のために用意されています。

使用例:

require 'net/pop'

pop = Net::POP3.new('pop.example.com')
pop.auth_only 'YourAccount', 'YourPassword'

@param account アカウント名文字列
@param password パスワード...

Net::POP3#set_debug_output(f) -> () (22.0)

デバッグ用の出力 f をセットします。

...さい。

f は << メソッドを持っているオブジェクトでなければなりません。

使用例:

require 'net/pop'

pop = Net::POP3.new('pop.example.com', 110)
pop.set_debug_output $stderr
pop.start('YourAccount', 'YourPassword') {
p pop.n_bytes
}

実行結果:

PO...

Net::POP3.APOP(is_apop) -> Class (22.0)

bool が真なら Net::APOP クラス、偽なら Net::POP3 クラスを返します。

...bool が真なら Net::APOP クラス、偽なら Net::POP3 クラスを返します。

使用例:

require 'net/pop'

pop = Net::POP3::APOP($isapop).new(addr, port)
pop.start(account, password) {
....
}

@param is_apop 真の場合に Net::APOP を返します。...

Net::POP3.start(address, port = nil, account=nil, password=nil, isapop=false) -> Net::POP3 (22.0)

Net::POP3 オブジェクトを生成し、サーバへ接続します。

...
Net::POP3
オブジェクトを生成し、サーバへ接続します。

ブロックを与えない場合には生成したオブジェクトを返します。

ブロックを与えた場合には、生成した Net::POP3 オブジェクトが
ブロックに渡され、ブロックが終わっ...
...995)を
使います。

以下のコードと同じ動作をします。
require 'net/pop'

Net::POP3
.new(address, port, isapop).start(account, password)

使用例:

require 'net/pop'

Net::POP3
.start(addr, port, account, password) {|pop|
pop.each_mail do |m|
file.write m.pop...
...バがAPOPを提供していない場合に発生します
@raise Net::POPError サーバが認証失敗以外のエラーを報告した場合に発生します
@raise Net::POPBadResponse サーバからの応答がプロトコル上不正であった場合に発生します

@see Net::POP3#start...

絞り込み条件を変える

Net::POP3.start(address, port = nil, account=nil, password=nil, isapop=false) {|pop| .... } -> object (22.0)

Net::POP3 オブジェクトを生成し、サーバへ接続します。

...
Net::POP3
オブジェクトを生成し、サーバへ接続します。

ブロックを与えない場合には生成したオブジェクトを返します。

ブロックを与えた場合には、生成した Net::POP3 オブジェクトが
ブロックに渡され、ブロックが終わっ...
...995)を
使います。

以下のコードと同じ動作をします。
require 'net/pop'

Net::POP3
.new(address, port, isapop).start(account, password)

使用例:

require 'net/pop'

Net::POP3
.start(addr, port, account, password) {|pop|
pop.each_mail do |m|
file.write m.pop...
...バがAPOPを提供していない場合に発生します
@raise Net::POPError サーバが認証失敗以外のエラーを報告した場合に発生します
@raise Net::POPBadResponse サーバからの応答がプロトコル上不正であった場合に発生します

@see Net::POP3#start...