るりまサーチ

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.013秒)
トップページ > クエリ:gc[x] > クエリ:disable[x] > 種類:ライブラリ[x]

別のキーワード

  1. gc stat
  2. gc latest_gc_info
  3. _builtin latest_gc_info
  4. _builtin gc

検索結果

net/smtp (19.0)

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

...を終了する

メールを送ったら Net::SMTP#finish を呼んで
セッションを終了しなければいけません。
File のように GC 時に勝手に close されることもありません。

# using SMTP#finish
require 'net/smtp'
smtp = Net::SMTP.start('smtp.example.com', 2...
...ているのに STARTTLS を使用したくない場合は Net::SMTP#disable_starttls を使用します。

require 'net/smtp'
# STARTTLSを使用したくない例
smtp = Net::SMTP.new('smtp.example.com', 25)
smtp.disable_starttls
smtp.start do
# send messages ...
end

デフォル...