るりまサーチ

最速Rubyリファレンスマニュアル検索!
104件ヒット [1-100件を表示] (0.019秒)
トップページ > クエリ:mail[x] > クラス:Net::SMTP[x]

別のキーワード

  1. pop mail
  2. net/pop mail
  3. popmail mail
  4. pop each_mail
  5. pop3 each_mail

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Net::SMTP#send_mail(mailsrc, from_addr, *to_addrs) -> () (6208.0)

メールを送信します。

...メールを送信します。

mail
src をメールとして送信します。
mail
src は each イテレータを持つ
オブジェクトならなんでも構いません(たとえば String や File)。

from_domain は送り主のメールアドレス ('...@...'のかたち) 、
to_addrs に...
...します。

require 'net/smtp'

Net::SMTP
.start('smtp.example.com') {|smtp|
smtp.send_message mail_string,
'from@example.com',
'to1@example.net', 'to2@example.net'
}

sendmail は obsolete です。

@param mailsrc メールの内容
@param fro...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します
@raise Net::SMTPUnknownError SMTPエラ...

Net::SMTP#sendmail(mailsrc, from_addr, *to_addrs) -> () (6208.0)

メールを送信します。

...メールを送信します。

mail
src をメールとして送信します。
mail
src は each イテレータを持つ
オブジェクトならなんでも構いません(たとえば String や File)。

from_domain は送り主のメールアドレス ('...@...'のかたち) 、
to_addrs に...
...します。

require 'net/smtp'

Net::SMTP
.start('smtp.example.com') {|smtp|
smtp.send_message mail_string,
'from@example.com',
'to1@example.net', 'to2@example.net'
}

sendmail は obsolete です。

@param mailsrc メールの内容
@param fro...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します
@raise Net::SMTPUnknownError SMTPエラ...

Net::SMTP#mailfrom(from_addr) -> Net::SMTP::Response (6101.0)

MAILFROM コマンドを送ります。

...MAILFROM コマンドを送ります。

通常は Net::SMTP#send_message, Net::SMTP#open_message_stream で
MAIL
FROM が送られるため利用する必要はないはずです。

@param from_addr 送信元メールアドレス...

Net::SMTP#send_message(mailsrc, from_addr, *to_addrs) -> () (3108.0)

メールを送信します。

...メールを送信します。

mail
src をメールとして送信します。
mail
src は each イテレータを持つ
オブジェクトならなんでも構いません(たとえば String や File)。

from_domain は送り主のメールアドレス ('...@...'のかたち) 、
to_addrs に...
...します。

require 'net/smtp'

Net::SMTP
.start('smtp.example.com') {|smtp|
smtp.send_message mail_string,
'from@example.com',
'to1@example.net', 'to2@example.net'
}

sendmail は obsolete です。

@param mailsrc メールの内容
@param fro...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します
@raise Net::SMTPUnknownError SMTPエラ...

Net::SMTP#open_message_stream(from_addr, *to_addrs) {|f| .... } -> () (13.0)

メール書き込みの準備をし、書き込み先のストリームオブジェクトを ブロックに渡します。ブロック終了後、書きこんだ結果が 送られます。

...re 'net/smtp'

Net::SMTP
.start('smtp.example.com', 25) {|smtp|
smtp.open_message_stream('from@example.com', 'to@example.net') {|f|
f.puts 'From: from@example.com'
f.puts 'To: to@example.net'
f.puts 'Subject: test mail'
f.puts
f.puts 'This is test mail.'
}
}...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します
@raise Net::SMTPAuthenticationError 送...
...信に必要な認証を行っていなかった場合に発生します
@raise Net::SMTPUnknownError SMTPエラーコードがプロトコル上不正な場合に発生します

@see Net::SMTP#send_message...

絞り込み条件を変える

Net::SMTP#ready(from_addr, *to_addrs) {|f| .... } -> () (13.0)

メール書き込みの準備をし、書き込み先のストリームオブジェクトを ブロックに渡します。ブロック終了後、書きこんだ結果が 送られます。

...re 'net/smtp'

Net::SMTP
.start('smtp.example.com', 25) {|smtp|
smtp.open_message_stream('from@example.com', 'to@example.net') {|f|
f.puts 'From: from@example.com'
f.puts 'To: to@example.net'
f.puts 'Subject: test mail'
f.puts
f.puts 'This is test mail.'
}
}...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します
@raise Net::SMTPAuthenticationError 送...
...信に必要な認証を行っていなかった場合に発生します
@raise Net::SMTPUnknownError SMTPエラーコードがプロトコル上不正な場合に発生します

@see Net::SMTP#send_message...

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

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

...開始します。


以下と同じです。

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

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

user と password の両方が与えられた...
...タイプで、
シンボルで :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...
...


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作られた 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 (7.0)

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

...開始します。


以下と同じです。

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

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

user と password の両方が与えられた...
...タイプで、
シンボルで :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...
...


以下と同じです。

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

このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブジェクト
を引数としてそのブロッ...

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

新しい 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 を呼ぶのは利用者の責任と
なります。

user と password の両方が与えられた...
...タイプで、
シンボルで :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...
<< 1 2 > >>