Ruby 2.3.0 リファレンスマニュアル > ライブラリ一覧 > net/popライブラリ > Net::POP3クラス

class Net::POP3

クラス・モジュールの継承リスト: Net::POP3 < Object < Kernel < BasicObject
aliases: Net::POP, Net::POPSession

要約

POP3 のセッションを表すクラスです。

特異メソッド

定義 説明
APOP(is_apop) -> Class

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

auth_only(address, port = nil, account, password, isapop=false)

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

certs -> String|nil

SSL のパラメータの ca_file (なければ ca_path) を返します。

default_port -> Integer
default_pop3_port -> Integer

POP3 のデフォルトのポート番号(110)を返します。

default_pop3s_port -> Integer

デフォルトのPOP3Sのポート番号(995)を返します。

delete_all(address, port = nil, account, password, isapop=false) -> ()
delete_all(address, port = nil, account, password, isapop=false) {|mail| .... } -> ()

POP セッションを開始し、サーバ上のメールを全て消去します。

disable_ssl -> ()

新しく生成する Net::POP3 オブジェクトが SSL を利用しないように設定します。

enable_ssl(verify_or_params={}, certs=nil) -> ()

新しく生成する Net::POP3 オブジェクトが SSL による通信利用するように設定します。

foreach(address, port = nil, account, password, isapop=false) {|mail| .... } -> ()

POP セッションを開始し、サーバ上のすべてのメールを取りだし、個々のメールを引数としてブロックを呼びだします。

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

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

socket_type -> Class

このメソッドは obsolete です。使わないでください。

ssl_params -> Hash|nil

SSL での接続を有効にしている場合には、 SSL の設定のハッシュを返します。

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

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

use_ssl? -> bool

新しく生成する Net::POP3 オブジェクトが SSL による通信利用するならば真を返します。

verify -> Integer|nil

SSL のパラメータの verify_mode を返します。

インスタンスメソッド

定義 説明
started? -> bool
active? -> bool

POP3 セッションが開始されていたら真を返します。

address -> String

接続するアドレスです。

apop? -> bool

このインスタンスが APOP を使ってサーバに接続するなら true を返します。

auth_only(account, password) -> ()

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

delete_all -> ()
delete_all {|popmail| .... } -> ()

サーバ上のメールを全て消去します。

disable_ssl -> ()

このインスタンスが SSL による通信を利用しないように設定します。

each_mail {|popmail| .... } -> [Net::POPMail]
each {|popmail| .... } -> [Net::POPMail]

サーバ上の各メールを引数としてブロックを呼びだします。

enable_ssl(verify_or_params={}, certs=nil) -> ()

このインスタンスが SSL による通信を利用するように設定します。

finish -> ()

POP3 セッションを終了し、接続を閉じます。

mails -> [Net::POPMail]

サーバ上の全てのメールを、Net::POPMailオブジェクトの配列として返します。

n_bytes -> Integer

サーバにあるメールの総バイト数を返します。

n_mails -> Integer

サーバにあるメールの数を返します。

open_timeout -> Integer

接続時に待つ最大秒数を返します。

open_timeout=(n)

接続時に待つ最大秒数を設定します。

port -> Integer

接続するポート番号です。

read_timeout -> Integer

読み込みでブロックしてよい最大秒数を返します。

read_timeout=(n)

読み込みでブロックしてよい最大秒数を設定します。

reset -> ()

セッションをリセットします。

set_debug_output(f) -> ()

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

start(account, password) -> self
start(account, password) {|pop| .... } -> object

サーバへ接続し、POP3のセッションを開始します。

use_ssl? -> bool

このインスタンスが SSL を使って接続するなら真を返します。

定数

定義 説明
Revision -> String

ライブラリ(ファイル)のリビジョンです。使わないでください。

継承したメソッド

! != __id__ __send__ instance_eval instance_exec method_missing singleton_method_added singleton_method_removed singleton_method_undefined !~ <=> == === =~ _dump class clone define_singleton_method display enum_for eql? equal? extend freeze frozen? hash initialize initialize_copy inspect instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? itself marshal_dump marshal_load method methods nil? object_id pretty_inspect pretty_print pretty_print_cycle pretty_print_inspect pretty_print_instance_variables private_methods protected_methods psych_to_yaml public_method public_methods public_send remove_instance_variable respond_to? respond_to_missing? send singleton_class singleton_method singleton_methods taint tainted? tap to_a to_ary to_hash to_int to_io to_proc to_regexp to_s to_str trust untaint untrust untrusted? .yaml_tag ::ARGF ::ARGV ::DATA ::ENV ::FALSE ::NIL ::RUBY_COPYRIGHT ::RUBY_DESCRIPTION ::RUBY_ENGINE ::RUBY_ENGINE_VERSION ::RUBY_PATCHLEVEL ::RUBY_PLATFORM ::RUBY_RELEASE_DATE ::RUBY_REVISION ::RUBY_VERSION ::SCRIPT_LINES__ ::STDERR ::STDIN ::STDOUT ::TOPLEVEL_BINDING ::TRUE