種類
- 特異メソッド (50)
- インスタンスメソッド (22)
- ライブラリ (11)
- 文書 (3)
クラス
-
Net
:: IMAP :: Address (11) -
Net
:: POP3 (11) -
Net
:: SMTP (50)
検索結果
先頭5件
- Net
:: SMTP # address -> String - net
/ smtp - Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) -> Net :: SMTP - Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) {|smtp| . . . . } -> object - Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , tls _ verify: true , tls _ hostname: nil , helo: & # 39;localhost& # 39; , user: nil , password: nil , authtype: DEFAULT _ AUTH _ TYPE) -> Net :: SMTP
-
Net
:: SMTP # address -> String (21101.0) -
接続先のアドレスを返します。
接続先のアドレスを返します。 -
net
/ smtp (6466.0) -
メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。
... SMTP (Simple Mail Transfer Protocol)
を扱うライブラリです。
ヘッダなどメールのデータを扱うことはできません。
SMTP の実装は 2821 に基いています。
=== 使用例
==== とにかくメールを送る
SMTP を使ってメールを送るにはまず SMTP.......。
require 'net/smtp'
Net::SMTP.start( 'smtp.example.com', 25 ) {|smtp|
# use smtp object only in this block
}
smtp-server.example.com は適切な SMTP サーバのアドレスに読みかえてください。
通常は LAN の管理者やプロバイダが SMTP サーバを用意し......らあとは Net::SMTP#send_message
でメールを流しこむだけです。
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25) {|smtp|
smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net')
From: Your Name <from@example.com>
To: Dest Address <to@example.net>... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) -> Net :: SMTP (3436.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish......られた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_str... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) {|smtp| . . . . } -> object (3436.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish......られた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_str... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , tls _ verify: true , tls _ hostname: nil , helo: & # 39;localhost& # 39; , user: nil , password: nil , authtype: DEFAULT _ AUTH _ TYPE) -> Net :: SMTP (3436.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish......られた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_str... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , tls _ verify: true , tls _ hostname: nil , helo: & # 39;localhost& # 39; , user: nil , password: nil , authtype: DEFAULT _ AUTH _ TYPE) {|smtp| . . . } -> object (3436.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish......られた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_str... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) -> Net :: SMTP (3430.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo, user, password, authtype)
このメソッドにブロックを与えた場合には、新しく......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish......られた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_str... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) {|smtp| . . . . } -> object (3430.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo, user, password, authtype)
このメソッドにブロックを与えた場合には、新しく......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish......られた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_str... -
Net
:: SMTP . new(address , port = Net :: SMTP . default _ port) -> Net :: SMTP (3397.0) -
新しい SMTP オブジェクトを生成します。 address はSMTPサーバーのFQDNで、 port は接続するポート番号です。 ただし、このメソッドではまだTCPの接続はしません。 Net::SMTP#start で接続します。
...新しい SMTP オブジェクトを生成します。
address はSMTPサーバーのFQDNで、
port は接続するポート番号です。
ただし、このメソッドではまだTCPの接続はしません。
Net::SMTP#start で接続します。
オブジェクトの生成と接続を同時......にしたい場合には
Net::SMTP.start を代わりに使ってください。
@param address 接続先のSMTPサーバの文字列
@param port 接続ポート番号
@see Net::SMTP.start, Net::SMTP#start... -
Net
:: IMAP :: Address # route -> String | nil (3016.0) -
メールアドレスの SMTP at-domain-list を返します。
...メールアドレスの SMTP at-domain-list を返します。
存在しない場合は nil を返します。
通常は nil を返します。... -
Net
:: POP3 . auth _ only(address , port = nil , account , password , isapop=false) (113.0) -
POP セッションを開き、認証だけを行って接続を切ります。
...を切ります。
主に POP before SMTP のために用意されています。
使用例:
require 'net/pop'
Net::POP3.auth_only('pop.example.com', nil, # using default port (110)
'YourAccount', 'YourPassword')
@param address POP3サーバのホスト名文字... -
NEWS for Ruby 3
. 1 . 0 (12.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...時に例外を発生させなくなりました。 16043
* Fiber Scheduler
* 変更されたメソッド
* Addrinfo.getaddrinfo がaddress_resolveフックをサポートしました。 17370
* ブロックなしの Timeout.timeout に timeout_after フックが導入されまし......f 0.21.1
* 以下のdefault gemsがbundled gemsに変更されました。
* net-ftp 0.1.3
* net-imap 0.2.2
* net-pop 0.1.1
* net-smtp 0.3.1
* matrix 0.4.2
* prime 0.1.2
* debug 1.4.0
* 以下が標準添付ライブラリから削除されました。
* dbm
*...