diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-18 08:57:37 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-18 08:57:37 +0000 |
commit | 08a0727577e23ee55ce0eb09a78826f7f7642411 (patch) | |
tree | 8b56995afa158a3faea8a5bc8cfed2f97cfbc706 /lib/net/smtp.rb | |
parent | f63956c52c796194f5a4f5178775d80582e543c1 (diff) | |
download | ruby-08a0727577e23ee55ce0eb09a78826f7f7642411.tar.gz |
o protocol.rb, http.rb, smtp.rb, pop.rb: update RD documents
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/smtp.rb')
-rw-r--r-- | lib/net/smtp.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 35e9118df8..09ae8ecb66 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -28,15 +28,24 @@ Net::Protocol === Class Methods : new( address = 'localhost', port = 25 ) - This method create new SMTP object. + creates a new Net::SMTP object. +: start( address = 'localhost', port = 25, *protoargs ) +: start( address = 'localhost', port = 25, *protoargs ) {|smtp| .... } + same to Net::SMTP.new( address, port ).start( *protoargs ) === Methods -: start( helo_domain = ENV['HOSTNAME'] || ENV['HOST'], account = nil, password = nil, authtype = nil ) - This method opens TCP connection and start SMTP. +: start( helo_domain = Socket.gethostname, \ + account = nil, password = nil, authtype = nil ) +: start( helo_domain = Socket.gethostname, \ + account = nil, password = nil, authtype = nil ) {|smtp| .... } + opens TCP connection and starts SMTP session. If protocol had been started, do nothing and return false. + When this methods is called as iterator, give a SMTP object to block and + close session after block call finished. + If account and password are given, is trying to get authentication by using AUTH command. "authtype" is :plain (symbol) or :cram_md5. |