From: ts Date: 2001-08-04T18:41:24+09:00 Subject: [ruby-talk:19117] Re: telnet.rb ECONNRESET >>>>> "D" == Dominik Geisel writes: D> ------------------------------------------------------------ D> pop = Net::Telnet::new({"Host" => pop_server, D> "Port" => pop_port, D> "Telnetmode" => true, D> "Timeout" => 30, D> "Output_log" => "output_log", D> "Prompt" => /^\+OK/n}) D> pop.cmd("user " + pop_username){|c| print c} D> pop.cmd("pass " + pop_password){|c| print c} D> ------------------------------------------------------------ You have a library 'net/pop' in the standard distribution of ruby require 'net/pop' # initialize the variable addr, ... begin Net::POP3.start( addr, port, acnt, pass ) do |pop| # do what you want with pop end rescue Net::ProtoAuthError puts $! end Guy Decoux