"Satish Talim" <satish.talim / gmail.com> writes:

> I tried the various suggestions given by Francis and Yohanes, but still it
> does not work.
>
> The executable code now is:
>
> require 'socket'
> t = TCPSocket.new('localhost', 25)
> puts t.gets
> t.puts "HELO Welcome from Ruby\r\n"
> puts t.gets
> t.puts "MAIL FROM:<satish_talim / yahoo.com>\r\n"
> puts t.gets
> t.puts "RCPT TO:<satish.talim / gmail.com>\r\n"
> puts t.gets
> t.puts 'DATA'
> puts t.gets
> t.puts "Test email from ruby\r\n"
> t.puts "\r\n.\r\n"
> t.puts 'QUIT'
> puts t.gets
> t.close
>
> and the output is:
>
>>ruby email.rb
> 220 Welcome to the 1st SMTP Server
>
> 250 Hello Welcome from Ruby
>
> 250 satish_talim / yahoo.com Address Okay
>
> 250 satish.talim / gmail.com Address Okay
>
> 354 Start mail input; end with <CRLF>.<CRLF>
>
> nil
>>Exit code: 0

/tmp $ ruby try.rb 
220 jenny-gnome.dyndns.org ESMTP
250 jenny-gnome.dyndns.org
250 ok
250 ok
354 go ahead
250 ok 1154319423 qp 25461
/tmp $ 

What is your SMTP server?

> I'd appreciate any other suggestions. Incidentally, if I write a program
> using the Net::SMTP class, I am able to send off emails with my current
> configuration.

Please paste this code that uses Net::SMTP.

YS.