From: "Leo M." Date: 2011-11-02T07:22:23+09:00 Subject: Ruby and Telnet Hello! I'm having problems with the library 'net/telnet'. What I'm trying to do is to re-create a normal telnet email session with a smtp server. So, my question is : is it possible to reproduce the HELO, MAIL FROM, RCPT TO etc in this Ruby module? What I tried to do is here below, and with this I receive correctly the 220 message, but what I'm seeking is the 250! require 'net/telnet' t = Net::Telnet::new( "Timeout" => 10, "Prompt" => /%/, "Host" => "gmail-smtp-in.l.google.com", "Port" => 25 ) t.login("*MY ACCOUNT*", "*MY PASSWORD*") {|str| print str} t.cmd("HELO *MY ACCOUNT*") {|str| print str} t.print("top") process_string = t.waitfor(/\d+ processes/) t.close Where am I mistaken? -- Posted via http://www.ruby-forum.com/.