ruby 'net/smtp' 发邮件问题

ruby 'net/smtp' 发邮件问题

require 'net/smtp'
smtp = Net::SMTP.start('smtp.sina.com', 25 , 'sina.com' 'spring_test','123456',authtype = :login) do |SMTP|
smtp.send_mail <<EndOfMail, 'spring_test@sina.com','spring_test@sina.com'
test
test2
EndOfMail
end

报错:
/smtp.rb:680:in `check_response': 504 #5.5.1 AUTH mechanism CRAM-MD5 is not available (Net::SMTPSyntaxError)
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:593:in `auth_cram_md5'
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:686:in `critical'
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:592:in `auth_cram_md5'
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:571:in `__send__'
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:571:in `authenticate'
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:411:in `do_start'
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'
   from /usr/local/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'
   from 1.rb:2
谁能指点一下啊?我换了163的还是一样的。
require 'net/smtp'
Net::SMTP.start('smtp.sina.com', 25 , 'sina.com' 'spring_test@sina.com','123456', :login) do |SMTP|
smtp.send_message('sssssssssssssssss', 'spring_test@sina.com','spring_test@sina.com')
end


/ruby/lib/ruby/1.8/net/protocol.rb:206:in `initialize': getaddrinfo: no address
associated with hostname. (SocketError)
  from C:/ruby/lib/ruby/1.8/net/protocol.rb:206:in `new'
  from C:/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
  from C:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
  from C:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
  from C:/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
  from C:/ruby/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
  from C:/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'
  from C:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'
  from mail.rb:2
格式写的有问题~~按下面的就OK~~

# PLAIN
  Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
       'Your Account', 'Your Password', :plain)
  # LOGIN
  Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
       'Your Account', 'Your Password', :login)

  # CRAM MD5
  Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
       'Your Account', 'Your Password', :cram_md5)