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:in
open’
from /usr/lib/ruby/1.8/net/smtp.rb:551:in do_start' from /usr/lib/ruby/1.8/timeout.rb:62:in
timeout’
from /usr/lib/ruby/1.8/timeout.rb:93:in timeout' from /usr/lib/ruby/1.8/net/smtp.rb:551:in
do_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:in
deliver!’
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:in
deliver’
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:in
auth’
from /usr/lib/ruby/1.8/net/pop.rb:990:in critical' from /usr/lib/ruby/1.8/net/pop.rb:882:in
auth’
from /usr/lib/ruby/1.8/net/pop.rb:555:in do_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:in start' 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:in last' 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:in method_missing' from /usr/lib/ruby/gems/1.8/gems/mail-1.5.2/lib/mail/mail.rb:135:in
last’
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:in
do_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:in
start’
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:in
last’
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:in
method_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?