title: Attempt at authenticated SMTP in Ruby
body: <p>I've looked at all the SMTP ruby-docs and can't figure out where I'm going wrong:</p>
  
  <pre><code>def send(username, password, data, toAddress, fromAddress)
  
      smtp = Net::SMTP.new('my.smtp.host', 25)
      smtp.start('thisisunimportant', username, password, "plain") do |sender|                                                                       
          sender.send_message(data, fromAddress, toAddress)
      end
  
  end
  
  send(user, pass, rcpt, "Hey!")
  </code></pre>
  
  <p>Gives an unexpected kind of error:</p>
  
  <p>/usr/lib/ruby/1.9.1/net/smtp.rb:725:in <code>authenticate': wrong number of arguments (3 for 4) (ArgumentError)
      from /usr/lib/ruby/1.9.1/net/smtp.rb:566:in</code>do_start'
      from /usr/lib/ruby/1.9.1/net/smtp.rb:531:in <code>start'
      from gmx_pop.rb:24:in</code>send'
      from gmx_pop.rb:30:in `'</p>
  
  <p>I've tried kicking my computer a couple times but the problem persists.</p>