Minero Aoki wrote:

> 
>> While I got the error as my last post after creating an smtp object
> 
> Please write error message/stack dump on the mail.
> What error did raised? ProtoSyntaxError?
> 

Originally, I got some kind of authentication error if I do not provide 
parameter to smtp.start, therefore I provide the need authentication 
parameters to it.  However, I cannot reproduce this error anymore, now it 
just works fine for me without passing any parameter to smtp.start


If I passed the needed parameters to smtp.start, I got the following error 
when using the following code.

    smtp = Net::SMTP.new( server )
    smtp.start( domain, acct, passwd ) do |smtp|
      smtp.sendmail( msg, fromAddr, toAddr )
    end

Net::ProtoSyntaxError: 500 500 5.5.1 Command unrecognized: "AUTH CRAM-MD5"
        from /usr/local/lib/ruby/1.6/net/protocol.rb:269:in `error!'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:440:in `reply_must'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:431:in `check_reply'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:445:in `getok'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:210:in `auth_cram_md5'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:210:in `critical'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:210:in `auth_cram_md5'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:162:in `__send__'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:162:in `do_start'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:182:in `_start'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:168:in `start'


I got the following error when I changed the code to

    smtp = Net::SMTP.new( server )
    smtp.start( domain, acct, passwd, :plain ) do |smtp|
      smtp.sendmail( msg, fromAddr, toAddr )
    end

Net::ProtoSyntaxError: 503 503 5.3.3 AUTH mechanism PLAIN not available
        from /usr/local/lib/ruby/1.6/net/protocol.rb:269:in `error!'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:440:in `reply_must'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:431:in `check_reply'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:445:in `getok'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:203:in `auth_plain'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:203:in `critical'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:203:in `auth_plain'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:162:in `__send__'
        from /usr/local/lib/ruby/1.6/net/smtp.rb:162:in `do_start'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:182:in `_start'
        from /usr/local/lib/ruby/1.6/net/protocol.rb:168:in `start'