るりまサーチ

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

別のキーワード

  1. net/smtp start
  2. net/imap name
  3. net/imap param
  4. net/http get
  5. net/imap data

ライブラリ

クラス

検索結果

<< 1 2 > >>

net/smtp (38096.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 サ...
...ているはずです。

セッションが開いたらあとは 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 <...
...要がある場合は別の方法を考える必要があるでしょう。

require 'net/smtp'
# STARTTLSの例
smtp = Net::SMTP.new('smtp.example.com', 25)
# SSLのコンテキストを作成してSSLの設定をし、context に代入しておく
# TLSを常に使うようにする
sm...
...equire 'net/smtp'
# STARTTLSを使用したくない例
smtp = Net::SMTP.new('smtp.example.com', 25)
smtp.disable_starttls
smtp.start do
# send messages ...
end

デフォルトではサーバー証明書の検証を行い、正当な証明書でない場合は OpenSSL::SSL::SSLError...

Net::SMTP#ssl? -> bool (26101.0)

その Net::SMTP オブジェクトが SMTPS を利用するならば真を返します。

その Net::SMTP オブジェクトが SMTPS を利用するならば真を返します。

@see Net::SMTP#enable_tls, Net::SMTP#disable_tls, Net::SMTP#start

Net::SMTP.default_ssl_context -> OpenSSL::SSL::SSLContext (14434.0)

SSL 通信に使われる SSL のコンテキストのデフォルト値を返します。

...SSL 通信に使われる SSL のコンテキストのデフォルト値を返します。...

Net::SMTP#enable_ssl(context = Net::SMTP.default_ssl_context) -> () (14215.0)

その Net::SMTP オブジェクトが SMTPS を利用するよう設定します。

...その Net::SMTP オブジェクトが SMTPS を利用するよう設定します。

このメソッドは Net::SMTP#start を呼ぶ前に呼ぶ必要があります。

@param context SSL接続で利用する OpenSSL::SSL::SSLContext

@see Net::SMTP#tls?, Net::SMTP#disable_tls...

Net::SMTP#disable_ssl -> () (14101.0)

その Net::SMTP オブジェクトが SMTPS を利用しないよう設定します。

その Net::SMTP オブジェクトが SMTPS を利用しないよう設定します。

@see Net::SMTP#disable_tls, Net::SMTP#tls?

絞り込み条件を変える

Net::SMTP.default_ssl_port -> Integer (14101.0)

デフォルトのSMTPSのポート番号(465)を返します。

デフォルトのSMTPSのポート番号(465)を返します。

Net::SMTP#enable_tls(context = Net::SMTP.default_ssl_context) -> () (11115.0)

その Net::SMTP オブジェクトが SMTPS を利用するよう設定します。

...その Net::SMTP オブジェクトが SMTPS を利用するよう設定します。

このメソッドは Net::SMTP#start を呼ぶ前に呼ぶ必要があります。

@param context SSL接続で利用する OpenSSL::SSL::SSLContext

@see Net::SMTP#tls?, Net::SMTP#disable_tls...

Net::SMTP#disable_tls -> () (11001.0)

その Net::SMTP オブジェクトが SMTPS を利用しないよう設定します。

その Net::SMTP オブジェクトが SMTPS を利用しないよう設定します。

@see Net::SMTP#disable_tls, Net::SMTP#tls?

Net::SMTP#tls? -> bool (11001.0)

その Net::SMTP オブジェクトが SMTPS を利用するならば真を返します。

その Net::SMTP オブジェクトが SMTPS を利用するならば真を返します。

@see Net::SMTP#enable_tls, Net::SMTP#disable_tls, Net::SMTP#start
<< 1 2 > >>