hi all,
I'm tackling the next area of my ruby development: the SMTP class. I can't seem to get it working correctly thoughif I do the following:
%sendmail email@address
this is a test
^D
%
I get the e-mail correctly. However, when I try running a simple SMTP script, I get an error:
irb(main):001:0> require 'net/smtp'
true
irb(main):002:0> smtp = Net::SMTP::new('localhost')
#<Net::SMTP localhost:25 open=false>
irb(main):003:0> smtp.start
Errno::EINVAL: Invalid argument - "connect(2)"
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:470:in `new'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:470:in `connect'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:469:in `timeout'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:469:in `connect'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:463:in `initialize'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:160:in `new'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:160:in `conn_socket'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:149:in `connect'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:143:in `_start'
from /usr/local/lib/ruby/site_ruby/1.6/net/protocol.rb:135:in `start'
from (irb):3
I'm thinking this is probably some silly error of mine, but I am copying it word for word from Ruby In a Nutshell©Äan anyone point out my ineptitude?
Thanks!
Jack
ps. Hal Fulton, I believe you read this list: your book just showed up and I'm hurrying to finish this so I can get back to it. Looks great so far!