るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.049秒)
トップページ > クエリ:String[x] > クエリ:password[x] > バージョン:3.2[x] > クエリ:net/smtp[x]

別のキーワード

  1. cgi password_field
  2. cgi/html password_field
  3. htmlextension password_field
  4. uri password=
  5. uri password

ライブラリ

クラス

検索結果

net/smtp (114289.0)

メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。

メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol)
を扱うライブラリです。

ヘッダなどメールのデータを扱うことはできません。
SMTP の実装は 2821 に基いています。

=== 使用例

==== とにかくメールを送る

SMTP を使ってメールを送るにはまず SMTP.start でセッションを開きます。
第一引数がサーバのアドレスで第二引数がポート番号です。
ブロックを使うと File.open と同じように終端処理を自動的にやってくれる
のでおすすめです。

require 'net/smtp'
Net::SMTP....

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = 'localhost', user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) -> Net::SMTP (24439.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.start(address, port = Net::SMTP.default_port, helo = 'localhost', user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) {|smtp| .... } -> object (24439.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.start(address, port = Net::SMTP.default_port, tls_verify: true, tls_hostname: nil, helo: 'localhost', user: nil, password: nil, authtype: DEFAULT_AUTH_TYPE) -> Net::SMTP (24439.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.start(address, port = Net::SMTP.default_port, tls_verify: true, tls_hostname: nil, helo: 'localhost', user: nil, password: nil, authtype: DEFAULT_AUTH_TYPE) {|smtp| ... } -> object (24439.0)

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。


以下と同じです。

require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)

このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
...

絞り込み条件を変える