Net/smtp authorization exception

I can’t send email using net/smtp from my mac running OSX 10.4. The SMTP
server
is run by my Internet Service Provider. Any idea
what I’m doing wrong? This is my code:

Net::SMTP.start(‘mail.mnet-online.de’,25,‘localhost.localdomain’,
[email protected]’,‘my password goes here’, :login)

I get the exception

/usr/local/lib/ruby/1.8/net/smtp.rb:680:in `check_response’: 538 5.7.0
Encryption required for requested authentication mechanism
(Net::SMTPUnknownError)

Sending mail works fine using the Mac mail.app with the settings which
you can
see in the attached screenshot. It also works from the shell using
mailx.

Althought :login seems to be the natural choice for the encryption
mechanism, I also tried :plain and the default, but (as expected) with
the same effect.

I suspect that the 3rd parameter (the HELO domain) is incorrect (I used
the
default described at
http://ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/classes/Net/SMTP.html#M000810),
but I don’t know what sensible value I should put here. BTW, I tried
also the
name which is output by uname -n as HELO domain, but with the same
result.

If you look at the attached screenshot, you can see that mail.app
connects to
the SMTP server using SSL encryption, so maybe this would be necessary
here
too, but I have no idea how to mimic this within Ruby.

Ronald

I think this may help you:

-Jonathan N.