60件ヒット
[1-60件を表示]
(0.007秒)
別のキーワード
検索結果
-
net
/ imap (19.0) -
このライブラリは Internet Message Access Protocol (IMAP) の クライアントライブラリです。2060 を元に 実装されています。
...ブジェクトを表示する。
require 'net/imap'
imap = Net::IMAP.new('mail.example.com')
imap.authenticate('LOGIN', 'joe_user', 'joes_password')
imap.examine('INBOX')
imap.search(["RECENT"]).each do |message_id|
envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]......l/sent-apr03" へ移動させる
require 'net/imap'
imap = Net::IMAP.new('mail.example.com')
imap.authenticate('LOGIN', 'joe_user', 'joes_password')
imap.select('Mail/sent-mail')
if not imap.list('Mail/', 'sent-apr03')
imap.create('Mail/sent-apr03')
end
imap.search(["BEFORE", "30......しています。例として、
require 'net/imap'
imap = Net::IMAP.new("imap.foo.net", "imap2")
imap.authenticate("cram-md5", "bar", "password")
imap.select("inbox")
fetch_thread = Thread.start { imap.fetch(1..-1, "UID") }
search_result = imap.search(["BODY", "hello"])
fetch_resul... -
net
/ smtp (13.0) -
メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。
...渡してください。
# 例
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25,
user: 'your_account', password: 'your_password', authtype: :cram_md5)
=== TLSを用いたSMTP通信
Net::SMTP は 3207 に基づいた STARTTLS を用いる
方法、もしくは 8314... -
net
/ http (7.0) -
汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。
...uby]{
require 'net/http'
Net::HTTP.start('www.example.com') {|http|
req = Net::HTTP::Get.new('/secret-page.html')
req.basic_auth 'account', 'password'
response = http.request(req)
print response.body
}
//}
=== フォームの値の区切り文字について
POSTで application/x-www-... -
net
/ pop (7.0) -
このライブラリは、POP3 (Post Office Protocol version 3) を 用いてPOPサーバからメールを受信する機能を提供するライブラリです。
...のホスト名に、
'YourAccount' と 'YourPassword' は適当なアカウント名とパスワード
に適宜読みかえてください。
require 'net/pop'
pop = Net::POP3.new('pop.example.com', 110)
pop.start('YourAccount', 'YourPassword') # POPのセッションを開始
if pop.m......#start, #finish を併合できます。
require 'net/pop'
Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx|
File.open("inbox/#{id......::POPMail#delete を併合できます。
require 'net/pop'
Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
if pop.mails.empty?
$stderr.puts 'no mail.'
else
i = 0
pop.delete_all do |m|
File.open("inbox/#{i}", '... -
net
/ smtp (7.0) -
メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。
...い。
# 例
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25, 'yourdomain.example.com',
'your_account', 'your_password', :cram_md5)
=== TLSを用いたSMTP通信
Net::SMTP は 3207 に基づいた STARTTLS を用いる
方法、もしくは 8314 に基づいた方... -
rubygems (7.0)
-
RubyGems を扱うためのクラスやモジュールが定義されているライブラリです。
...Proxy サーバ経由で Gem パッケージをインストールするには以下のようにします。
$ gem install rak -p http://user:password@proxy.example.com/
==== Gem パッケージをアンインストールする
例えば rak をアンインストールするには、以下の...