@@ -80,7 +80,7 @@ module Net
8080 # ==== List sender and subject of all recent messages in the default mailbox
8181 #
8282 # imap = Net::IMAP.new('mail.example.com')
83- # imap.authenticate('LOGIN ', 'joe_user', 'joes_password')
83+ # imap.authenticate('PLAIN ', 'joe_user', 'joes_password')
8484 # imap.examine('INBOX')
8585 # imap.search(["RECENT"]).each do |message_id|
8686 # envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]
@@ -90,7 +90,7 @@ module Net
9090 # ==== Move all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03"
9191 #
9292 # imap = Net::IMAP.new('mail.example.com')
93- # imap.authenticate('LOGIN ', 'joe_user', 'joes_password')
93+ # imap.authenticate('PLAIN ', 'joe_user', 'joes_password')
9494 # imap.select('Mail/sent-mail')
9595 # if not imap.list('Mail/', 'sent-apr03')
9696 # imap.create('Mail/sent-apr03')
@@ -190,7 +190,7 @@ module Net
190190 # Net::IMAP supports concurrent threads. For example,
191191 #
192192 # imap = Net::IMAP.new("imap.foo.net", "imap2")
193- # imap.authenticate("cram -md5", "bar", "password")
193+ # imap.authenticate("scram -md5", "bar", "password")
194194 # imap.select("inbox")
195195 # fetch_thread = Thread.start { imap.fetch(1..-1, "UID") }
196196 # search_result = imap.search(["BODY", "hello"])
@@ -772,13 +772,18 @@ class << self
772772 # status # => "OK"
773773 # # The client is connected in the "Not Authenticated" state.
774774 #
775- # Connect with TLS to port 993 at mail.example.com:
775+ # Connect with TLS to port 993
776776 # imap = Net::IMAP.new('mail.example.com', ssl: true) # => #<Net::IMAP:0x00007f79b0872bd0>
777777 # imap.port => 993
778778 # imap.tls_verified? => true
779- # imap.greeting => name: ("OK" | "PREAUTH") => status
780- # status # => "OK"
781- # # The client is connected in the "Not Authenticated" state.
779+ # imap.greeting => name: (/OK/i | /PREAUTH/i) => status
780+ # case status
781+ # in /OK/i
782+ # # The client is connected in the "Not Authenticated" state.
783+ # imap.authenticate("PLAIN", "joe_user", "joes_password")
784+ # in /PREAUTH/i
785+ # # The client is connected in the "Authenticated" state.
786+ # end
782787 #
783788 # Connect with prior authentication, for example using an SSL certificate:
784789 # ssl_ctx_params = {
0 commit comments