summaryrefslogtreecommitdiff
path: root/lib/net/smtp.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-17 18:39:43 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-17 18:39:43 +0000
commit3e51a5b1b5a953e4705adc924355ffdc83b25472 (patch)
treebe35b23555d126828b03f9969c7dca0861fa0017 /lib/net/smtp.rb
parent35e731649da88fda916509eb1cb0a745d772f21c (diff)
o protocol.rb: Protocol#start yields self
o smtp.rb: use Socket.gethostname to get localhost name p pop.rb: use MD5#hexdigest git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/smtp.rb')
-rw-r--r--lib/net/smtp.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index fe3dd9e..35e9118 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -109,9 +109,10 @@ Net::Protocol
def do_start( helodom = nil,
user = nil, secret = nil, authtype = nil )
unless helodom then
- helodom = ENV['HOSTNAME'] || ENV['HOST']
+ helodom = ::Socket.gethostname
unless helodom then
- raise ArgumentError, "cannot get hostname"
+ raise ArgumentError,
+ "cannot get localhost name; try 'smtp.start(local_host_name)'"
end
end