summaryrefslogtreecommitdiff
path: root/lib/net/smtp.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-18 08:57:37 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-18 08:57:37 +0000
commit08a0727577e23ee55ce0eb09a78826f7f7642411 (patch)
tree8b56995afa158a3faea8a5bc8cfed2f97cfbc706 /lib/net/smtp.rb
parentf63956c52c796194f5a4f5178775d80582e543c1 (diff)
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.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index 35e9118..09ae8ec 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.