diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 145f897..075adef 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -316,12 +316,13 @@ def capable_cram_md5_auth? auth_capable?('CRAM-MD5') end + # Returns whether the server advertises support for the authentication type. + # You cannot get valid result before opening SMTP session. def auth_capable?(type) return nil unless @capabilities return false unless @capabilities['AUTH'] @capabilities['AUTH'].include?(type) end - private :auth_capable? # Returns supported authentication methods on this server. # You cannot get valid value before opening SMTP session.