144件ヒット
[1-100件を表示]
(0.051秒)
種類
- インスタンスメソッド (96)
- 特異メソッド (36)
- ライブラリ (12)
ライブラリ
-
net
/ smtp (132)
クラス
-
Net
:: SMTP (132)
キーワード
-
default
_ ssl _ context (12) -
default
_ ssl _ port (12) -
default
_ tls _ port (12) -
disable
_ ssl (12) -
disable
_ tls (12) -
enable
_ ssl (12) -
enable
_ starttls (12) -
enable
_ starttls _ auto (12) -
enable
_ tls (12) - ssl? (12)
- tls? (12)
検索結果
先頭5件
-
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
