@@ -257,11 +257,9 @@ module Net
257
257
# In addition to the universal commands, the following commands are valid in
258
258
# the "_authenticated_" state:
259
259
#
260
- #--
261
- # - #enable: <em>Not implemented by Net::IMAP, yet.</em>
260
+ # - #enable: Enables backwards incompatible server extensions.
262
261
#
263
262
# <em>Requires the +ENABLE+ capability.</em>
264
- #++
265
263
# - #select: Open a mailbox and enter the "_selected_" state.
266
264
# - #examine: Open a mailbox read-only, and enter the "_selected_" state.
267
265
# - #create: Creates a new mailbox.
@@ -331,12 +329,11 @@ module Net
331
329
#
332
330
# Although IMAP4rev2[https://tools.ietf.org/html/rfc9051] is <em>not supported
333
331
# yet</em>, Net::IMAP supports several extensions that have been folded into
334
- # it: +IDLE+, +MOVE+, +NAMESPACE+, +UIDPLUS+, and +UNSELECT+.
332
+ # it: +ENABLE+, + IDLE+, +MOVE+, +NAMESPACE+, +UIDPLUS+, and +UNSELECT+.
335
333
#--
336
334
# TODO: RFC4466, ABNF extensions (automatic support for other extensions)
337
335
# TODO: +ESEARCH+, ExtendedSearchData
338
336
# TODO: +SEARCHRES+,
339
- # TODO: +ENABLE+,
340
337
# TODO: +SASL-IR+,
341
338
# TODO: +LIST-EXTENDED+,
342
339
# TODO: +LIST-STATUS+,
@@ -435,6 +432,11 @@ module Net
435
432
# TODO...
436
433
#++
437
434
#
435
+ # ==== RFC5161: +ENABLE+
436
+ # Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], so it is also
437
+ # listed with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands].
438
+ # - #enable: Enables backwards incompatible server extensions.
439
+ #
438
440
#--
439
441
# ==== RFC5182 +SEARCHRES+
440
442
# TODO...
@@ -1882,17 +1884,22 @@ def uid_thread(algorithm, search_keys, charset)
1882
1884
# Sends an {ENABLE command [RFC5161 §3.2]}[https://www.rfc-editor.org/rfc/rfc5161#section-3.1]
1883
1885
# {[IMAP4rev2 §6.3.1]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.3.1]
1884
1886
# to enable the specified extenstions, which may be either an
1885
- # array or a string.
1887
+ # array or a string. Returns a list of the extensions that were enabled.
1886
1888
#
1887
1889
# Some of the extensions that use ENABLE permit the server to send
1888
1890
# syntax that this class cannot parse. Caution is advised.
1889
1891
#
1892
+ # The +ENABLE+ command is only valid in the _authenticated_ state, before
1893
+ # any mailbox is selected.
1894
+ #
1890
1895
# ===== Capabilities
1891
1896
#
1892
1897
# The server's capabilities must include +ENABLE+
1893
1898
# [RFC5161[https://tools.ietf.org/html/rfc5161]] or IMAP4REV2
1894
1899
# [RFC9051[https://tools.ietf.org/html/rfc9051]].
1895
-
1900
+ #
1901
+ # Additionally, the server capabilities must include a capability matching
1902
+ # each enabled extension (usually the same name as the enabled extension).
1896
1903
def enable ( extensions )
1897
1904
synchronize do
1898
1905
send_command ( "ENABLE #{ [ extensions ] . flatten . join ( ' ' ) } " )
0 commit comments