@@ -425,9 +425,10 @@ def disconnected?
425
425
return @sock . closed?
426
426
end
427
427
428
- # Sends a CAPABILITY command, and returns an array of
429
- # capabilities that the server supports. Each capability
430
- # is a string.
428
+ # Sends a {CAPABILITY command [IMAP4rev1
429
+ # §6.1.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.1] and returns
430
+ # an array of capabilities that the server supports. Each capability is a
431
+ # string.
431
432
#
432
433
# See the {IANA IMAP4 capabilities
433
434
# registry}[http://www.iana.org/assignments/imap4-capabilities] for a list
@@ -462,8 +463,9 @@ def capability
462
463
end
463
464
end
464
465
465
- # Sends an ID command, and returns a hash of the server's
466
- # response, or nil if the server does not identify itself.
466
+ # Sends an {ID command}[https://tools.ietf.org/html/rfc2971] and returns
467
+ # a hash of the server's response, or nil if the server does not identify
468
+ # itself.
467
469
#
468
470
# Note that the user should first check if the server supports the ID
469
471
# capability. For example:
@@ -491,19 +493,25 @@ def id(client_id=nil)
491
493
end
492
494
end
493
495
494
- # Sends a NOOP command to the server. It does nothing.
496
+ # Sends a {NOOP command [IMAP4rev1
497
+ # §6.1.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.2] to the
498
+ # server.
495
499
def noop
496
500
send_command ( "NOOP" )
497
501
end
498
502
499
- # Sends a LOGOUT command to inform the server that the client is
500
- # done with the connection.
503
+ # Sends a {LOGOUT command [IMAP4rev1
504
+ # §6.1.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.3] to inform
505
+ # the command to inform the server that the client is done with the
506
+ # connection.
501
507
def logout
502
508
send_command ( "LOGOUT" )
503
509
end
504
510
505
- # Sends a STARTTLS command to start TLS session.
506
- # Sends a STARTTLS command to start a TLS session.
511
+ ##
512
+ # Sends a {STARTTLS command [IMAP4rev1
513
+ # §6.2.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.1]: to start a
514
+ # TLS session.
507
515
#
508
516
# ===== Capability
509
517
#
@@ -525,9 +533,12 @@ def starttls(options = {}, verify = true)
525
533
end
526
534
end
527
535
528
- # Sends an AUTHENTICATE command to authenticate the client.
529
- # The +auth_type+ parameter is a string that represents
530
- # the authentication mechanism to be used. Currently Net::IMAP
536
+ # Sends an {AUTHENTICATE command [IMAP4rev1
537
+ # §6.2.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.2]) to
538
+ # authenticate the client.
539
+ #
540
+ # The +auth_type+ parameter is a string that
541
+ # represents the authentication mechanism to be used. Currently Net::IMAP
531
542
# supports the following mechanisms:
532
543
#
533
544
# PLAIN:: Login using cleartext user and password. Secure with TLS.
@@ -583,10 +594,11 @@ def authenticate(auth_type, *args)
583
594
end
584
595
end
585
596
586
- # Sends a LOGIN command to identify the client and carries
587
- # the plaintext +password+ authenticating this +user+. Note
588
- # that, unlike calling #authenticate with an +auth_type+
589
- # of "LOGIN", #login does *not* use the login authenticator.
597
+ # Sends a {LOGIN command [IMAP4rev1
598
+ # §6.2.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.3]: to
599
+ # identify the client and carries the plaintext +password+ authenticating
600
+ # this +user+. Note that, unlike calling #authenticate with an +auth_type+
601
+ # of "LOGIN", #login does *not* use the LoginAuthenticator.
590
602
#
591
603
# A Net::IMAP::NoResponseError is raised if authentication fails.
592
604
#
@@ -601,8 +613,9 @@ def login(user, password)
601
613
send_command ( "LOGIN" , user , password )
602
614
end
603
615
604
- # Sends a SELECT command to select a +mailbox+ so that messages
605
- # in the +mailbox+ can be accessed.
616
+ # Sends a {SELECT command [IMAP4rev1
617
+ # §6.3.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.1] to select a
618
+ # +mailbox+ so that messages in the +mailbox+ can be accessed.
606
619
#
607
620
# After you have selected a mailbox, you may retrieve the number of items in
608
621
# that mailbox from <tt>imap.responses["EXISTS"][-1]</tt>, and the number of
@@ -628,9 +641,11 @@ def select(mailbox)
628
641
end
629
642
end
630
643
631
- # Sends a EXAMINE command to select a +mailbox+ so that messages
632
- # in the +mailbox+ can be accessed. Behaves the same as #select,
633
- # except that the selected +mailbox+ is identified as read-only.
644
+ # Sends a {EXAMINE command [IMAP4rev1
645
+ # §6.3.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.2] to select a
646
+ # +mailbox+ so that messages in the +mailbox+ can be accessed. Behaves the
647
+ # same as #select, except that the selected +mailbox+ is identified as
648
+ # read-only.
634
649
#
635
650
# A Net::IMAP::NoResponseError is raised if the mailbox does not
636
651
# exist or is for some reason non-examinable.
@@ -641,15 +656,19 @@ def examine(mailbox)
641
656
end
642
657
end
643
658
644
- # Sends a CREATE command to create a new +mailbox+.
659
+ # Sends a {CREATE command [IMAP4rev1
660
+ # §6.3.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.3] to create a
661
+ # new +mailbox+.
645
662
#
646
663
# A Net::IMAP::NoResponseError is raised if a mailbox with that name
647
664
# cannot be created.
648
665
def create ( mailbox )
649
666
send_command ( "CREATE" , mailbox )
650
667
end
651
668
652
- # Sends a DELETE command to remove the +mailbox+.
669
+ # Sends a {DELETE command [IMAP4rev1
670
+ # §6.3.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.4] to remove
671
+ # the +mailbox+.
653
672
#
654
673
# A Net::IMAP::NoResponseError is raised if a mailbox with that name
655
674
# cannot be deleted, either because it does not exist or because the
@@ -658,8 +677,9 @@ def delete(mailbox)
658
677
send_command ( "DELETE" , mailbox )
659
678
end
660
679
661
- # Sends a RENAME command to change the name of the +mailbox+ to
662
- # +newname+.
680
+ # Sends a {RENAME command [IMAP4rev1
681
+ # §6.3.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.5] to change
682
+ # the name of the +mailbox+ to +newname+.
663
683
#
664
684
# A Net::IMAP::NoResponseError is raised if a mailbox with the
665
685
# name +mailbox+ cannot be renamed to +newname+ for whatever
@@ -988,9 +1008,10 @@ def check
988
1008
send_command ( "CHECK" )
989
1009
end
990
1010
991
- # Sends a CLOSE command to close the currently selected mailbox.
992
- # The CLOSE command permanently removes from the mailbox all
993
- # messages that have the \Deleted flag set.
1011
+ # Sends a {CLOSE command [IMAP4rev1
1012
+ # §6.4.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.2] to close
1013
+ # the currently selected mailbox. The CLOSE command permanently removes
1014
+ # from the mailbox all messages that have the <tt>\\Deleted</tt> flag set.
994
1015
def close
995
1016
send_command ( "CLOSE" )
996
1017
end
0 commit comments