SMTP Net::SMTPUnknownError

Hi:

I’m using the Net::SMTP class, and I’m getting this error

:!ruby1.8 scripts/ruby/sendmail.rb
/usr/local/bin/lib/ruby/1.8/net/smtp.rb:638:in `check_response’:
334 VXNlcm5hbWU6 (Net::SMTPUnknownError)

I’ve just commented out the line 638 and it worked fine [the mail was sent]:

 629     def check_response( res, allow_continue = false )
 630       return res if /\A2/ === res
 631       return res if allow_continue and /\A354/ === res
 632       err = case res
 633             when /\A4/  then SMTPServerBusy
 634             when /\A50/ then SMTPSyntaxError
 635             when /\A55/ then SMTPFatalError
 636             else SMTPUnknownError
 637             end
 638       #raise err, res
 639     end

Should I be aware of something going wrong on the background ?

Thanks.
Ronnie
#ls /usr/bin
ls
ruby

···

/usr/local/bin/lib/ruby/1.8/net/smtp.rb:638:in `check_response':
334 VXNlcm5hbWU6 (Net::SMTPUnknownError)

This is SMTP with authentification, that you use ?

Guy Decoux

Should I be aware of something going wrong on the background ?

It's corrected in 1.8.1, the new def #check_response is

    def check_response( res, allow_continue = false )
      return res if /\A2/ === res
      return res if allow_continue and /\A3/ === res
      err = case res
            when /\A4/ then SMTPServerBusy
            when /\A50/ then SMTPSyntaxError
            when /\A55/ then SMTPFatalError
            else SMTPUnknownError
            end
      raise err, res
    end

Guy Decoux

Thanks Guy.

ts wrote:

···

“B” == Bermejo, Rodrigo rodrigo.bermejo@ps.ge.com writes:

Should I be aware of something going wrong on the background ?

It’s corrected in 1.8.1, the new def #check_response is

def check_response( res, allow_continue = false )
return res if /\A2/ === res
return res if allow_continue and /\A3/ === res
err = case res
when /\A4/ then SMTPServerBusy
when /\A50/ then SMTPSyntaxError
when /\A55/ then SMTPFatalError
else SMTPUnknownError
end
raise err, res
end

Guy Decoux