summaryrefslogtreecommitdiff
path: root/lib/net/smtp.rb
diff options
context:
space:
mode:
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 fe3dd9e1b2..35e9118df8 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