るりまサーチ

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

別のキーワード

  1. rubygems/user_interaction new
  2. rubygems/user_interaction done
  3. rubygems/user_interaction count
  4. rubygems/user_interaction updated
  5. http proxy_user

ライブラリ

クラス

検索結果

net/smtp (38090.0)

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

...す。
ブロックを使うと File.open と同じように終端処理を自動的にやってくれる
のでおすすめです。

require 'net/smtp'
Net::SMTP.start( 'smtp.example.com', 25 ) {|smtp|
# use smtp object only in this block
}

smtp-server.example.com は適切な SMTP サ...
...rom@example.com>
To: Dest Address <to@example.net>
Subject: test mail
Date: Sat, 23 Jun 2001 16:26:43 +0900
Message-Id: <unique.message.id.string@yourhost.example.com>

This is a test mail.
EndOfMail
}

==== セッションを終了する

メールを送ったら Net::SMTP#finish...
...TP.start もしくは Net::SMTP#start
の引数に追加の引数を渡してください。

# 例
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25,
'user: your_account', password: 'your_password', authtype: :cram_md5)

=== TLSを用いたSMTP通信
Net::SMTP は 32...

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) -> Net::SMTP (8146.0)

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

...を生成し、サーバに接続し、セッションを開始します。


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作...
...
なります。

user
と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('...
...smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポート番号、デフォルトは 25 です
@param tls_verify サーバー証明書を...

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) {|smtp| .... } -> object (8146.0)

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

...を生成し、サーバに接続し、セッションを開始します。


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作...
...
なります。

user
と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('...
...smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポート番号、デフォルトは 25 です
@param tls_verify サーバー証明書を...

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 (8146.0)

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

...を生成し、サーバに接続し、セッションを開始します。


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作...
...
なります。

user
と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('...
...smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポート番号、デフォルトは 25 です
@param tls_verify サーバー証明書を...

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 (8146.0)

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

...を生成し、サーバに接続し、セッションを開始します。


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作...
...
なります。

user
と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('...
...smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポート番号、デフォルトは 25 です
@param tls_verify サーバー証明書を...

絞り込み条件を変える

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) -> Net::SMTP (8138.0)

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

...クトを生成し、サーバに接続し、セッションを開始します。


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブ...
...
なります。

user
と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('...
...smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポート番号、デフォルトは 25 です
@param tls_verify サーバー証明書を...

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) {|smtp| .... } -> object (8138.0)

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

...クトを生成し、サーバに接続し、セッションを開始します。


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブ...
...
なります。

user
と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('...
...smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポート番号、デフォルトは 25 です
@param tls_verify サーバー証明書を...