Problem in accessing SSL enabled mail server

Hi,

I have two different mail server servers. Both are SSL enabled.
When I try to read mail from my mail box I got following error on 1
machine,

Errno::ECONNREFUSED: Connection refused - connect(2)
from /usr/lib/ruby/1.8/net/smtp.rb:551:in initialize' from /usr/lib/ruby/1.8/net/smtp.rb:551:inopen’
from /usr/lib/ruby/1.8/net/smtp.rb:551:in do_start' from /usr/lib/ruby/1.8/timeout.rb:62:intimeout’
from /usr/lib/ruby/1.8/timeout.rb:93:in timeout' from /usr/lib/ruby/1.8/net/smtp.rb:551:indo_start’
from /usr/lib/ruby/1.8/net/smtp.rb:525:in start' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/ delivery_methods/smtp.rb:84:indeliver!’
from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/
deliverable.rb:11:in perform_delivery!' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/mail.rb:122:indeliver’
from (irb):6

And for other machine

Net::POPAuthenticationError: -ERR only valid after entering TLS mode
from /usr/lib/ruby/1.8/net/pop.rb:983:in check_response_auth' from /usr/lib/ruby/1.8/net/pop.rb:883:inauth’
from /usr/lib/ruby/1.8/net/pop.rb:990:in critical' from /usr/lib/ruby/1.8/net/pop.rb:882:inauth’
from /usr/lib/ruby/1.8/net/pop.rb:555:in do_start' from /usr/lib/ruby/1.8/net/pop.rb:528:instart’
from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/
retriever_methods/pop3.rb:163:in start' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/ retriever_methods/pop3.rb:113:infind’
from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/
retriever_methods/pop3.rb:87:in last' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/ retrievable.rb:14:insend
from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/
retrievable.rb:14:in method_missing' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/mail.rb:135:inlast’
from (irb):7

if for second server (error) if I specify enable_tls
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3
read server hello A: unknown protocol
from /usr/lib/ruby/1.8/net/pop.rb:541:in connect' from /usr/lib/ruby/1.8/net/pop.rb:541:indo_start’
from /usr/lib/ruby/1.8/net/pop.rb:528:in start' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/ retriever_methods/pop3.rb:163:instart’
from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/
retriever_methods/pop3.rb:113:in find' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/ retriever_methods/pop3.rb:87:inlast’
from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/
retrievable.rb:14:in __send__' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/network/ retrievable.rb:14:inmethod_missing’
from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/mail.rb:135:in
`last’
from (irb):9

my code for reading email is,

Mail.defaults do
pop3 ‘’ do
user ‘’
pass ‘’
#enable_tls
end
end

Is it I missed something over here?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs