@@ -735,7 +735,7 @@ module Net
735
735
# * {GSSAPI/Kerberos/SASL Service Names}[https://www.iana.org/assignments/gssapi-service-names/gssapi-service-names.xhtml]:
736
736
# +imap+
737
737
# * {Character sets}[https://www.iana.org/assignments/character-sets/character-sets.xhtml]
738
- # ===== For currently unsupported features:
738
+ # ==== For currently unsupported features:
739
739
# * {IMAP Quota Resource Types}[http://www.iana.org/assignments/imap4-capabilities#imap-capabilities-2]
740
740
# * {LIST-EXTENDED options and responses}[https://www.iana.org/assignments/imap-list-extended/imap-list-extended.xhtml]
741
741
# * {IMAP METADATA Server Entry and Mailbox Entry Registries}[https://www.iana.org/assignments/imap-metadata/imap-metadata.xhtml]
@@ -2377,6 +2377,10 @@ def uid_expunge(uid_set)
2377
2377
# result = imap.search(["SUBJECT", "hi there", "not", "new"])
2378
2378
# #=> Net::IMAP::SearchResult[1, 6, 7, 8, modseq: 5594]
2379
2379
# result.modseq # => 5594
2380
+ #
2381
+ # The +SEARCH+ command is prohibited when
2382
+ # UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] has been enabled.
2383
+ # Use #uid_search instead.
2380
2384
def search ( ...)
2381
2385
search_internal ( "SEARCH" , ...)
2382
2386
end
@@ -2394,6 +2398,15 @@ def search(...)
2394
2398
# capability has been enabled.
2395
2399
#
2396
2400
# See #search for documentation of parameters.
2401
+ #
2402
+ # ==== Capabilities
2403
+ #
2404
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] is enabled, the
2405
+ # <tt><message set></tt> search criterion is prohibited. Use +ALL+ or
2406
+ # <tt>UID sequence-set</tt> instead.
2407
+ #
2408
+ # Otherwise, #uid_search is updated by extensions in the same way as
2409
+ # #search.
2397
2410
def uid_search ( ...)
2398
2411
search_internal ( "UID SEARCH" , ...)
2399
2412
end
@@ -2445,12 +2458,15 @@ def uid_search(...)
2445
2458
# {[RFC7162]}[https://tools.ietf.org/html/rfc7162] in order to use the
2446
2459
# +changedsince+ argument. Using +changedsince+ implicitly enables the
2447
2460
# +CONDSTORE+ extension.
2461
+ #
2462
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] is enabled, the
2463
+ # +FETCH+ command is prohibited. Use #uid_fetch instead.
2448
2464
def fetch ( ...)
2449
2465
fetch_internal ( "FETCH" , ...)
2450
2466
end
2451
2467
2452
2468
# :call-seq:
2453
- # uid_fetch(set, attr, changedsince: nil, partial: nil) -> array of FetchData
2469
+ # uid_fetch(set, attr, changedsince: nil, partial: nil) -> array of FetchData (or UIDFetchData)
2454
2470
#
2455
2471
# Sends a {UID FETCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8]
2456
2472
# to retrieve data associated with a message in the mailbox.
@@ -2502,7 +2518,11 @@ def fetch(...)
2502
2518
# {[RFC9394]}[https://rfc-editor.org/rfc/rfc9394] in order to use the
2503
2519
# +partial+ argument.
2504
2520
#
2505
- # Otherwise, the same as #fetch.
2521
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] has been
2522
+ # enabled, #uid_fetch must be used instead of #fetch, and UIDFetchData will
2523
+ # be returned instead of FetchData.
2524
+ #
2525
+ # Otherwise, #uid_fetch is updated by extensions in the same way as #fetch.
2506
2526
def uid_fetch ( ...)
2507
2527
fetch_internal ( "UID FETCH" , ...)
2508
2528
end
@@ -2550,12 +2570,16 @@ def uid_fetch(...)
2550
2570
# {[RFC7162]}[https://tools.ietf.org/html/rfc7162] in order to use the
2551
2571
# +unchangedsince+ argument. Using +unchangedsince+ implicitly enables the
2552
2572
# +CONDSTORE+ extension.
2573
+ #
2574
+ # The +STORE+ command is prohibited when
2575
+ # UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] has been enabled.
2576
+ # Use #uid_store instead.
2553
2577
def store ( set , attr , flags , unchangedsince : nil )
2554
2578
store_internal ( "STORE" , set , attr , flags , unchangedsince : unchangedsince )
2555
2579
end
2556
2580
2557
2581
# :call-seq:
2558
- # uid_store(set, attr, value, unchangedsince: nil) -> array of FetchData
2582
+ # uid_store(set, attr, value, unchangedsince: nil) -> array of FetchData (or UIDFetchData)
2559
2583
#
2560
2584
# Sends a {UID STORE command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8]
2561
2585
# to alter data associated with messages in the mailbox, in particular their
@@ -2567,7 +2591,12 @@ def store(set, attr, flags, unchangedsince: nil)
2567
2591
# Related: #store
2568
2592
#
2569
2593
# ==== Capabilities
2570
- # Same as #store.
2594
+ #
2595
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] has been
2596
+ # enabled, #uid_store must be used instead of #store, and UIDFetchData will
2597
+ # be returned instead of FetchData.
2598
+ #
2599
+ # Otherwise, #uid_store is updated by extensions in the same way as #store.
2571
2600
def uid_store ( set , attr , flags , unchangedsince : nil )
2572
2601
store_internal ( "UID STORE" , set , attr , flags , unchangedsince : unchangedsince )
2573
2602
end
@@ -2586,6 +2615,9 @@ def uid_store(set, attr, flags, unchangedsince: nil)
2586
2615
# with UIDPlusData. This will report the UIDVALIDITY of the destination
2587
2616
# mailbox, the UID set of the source messages, and the assigned UID set of
2588
2617
# the moved messages.
2618
+ #
2619
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] is enabled, the
2620
+ # +COPY+ command is prohibited. Use #uid_copy instead.
2589
2621
def copy ( set , mailbox )
2590
2622
copy_internal ( "COPY" , set , mailbox )
2591
2623
end
@@ -2598,7 +2630,10 @@ def copy(set, mailbox)
2598
2630
#
2599
2631
# ==== Capabilities
2600
2632
#
2601
- # +UIDPLUS+ affects #uid_copy the same way it affects #copy.
2633
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] has been
2634
+ # enabled, #uid_copy must be used instead of #copy.
2635
+ #
2636
+ # Otherwise, #uid_copy is updated by extensions in the same way as #copy.
2602
2637
def uid_copy ( set , mailbox )
2603
2638
copy_internal ( "UID COPY" , set , mailbox )
2604
2639
end
@@ -2622,6 +2657,8 @@ def uid_copy(set, mailbox)
2622
2657
# mailbox, the UID set of the source messages, and the assigned UID set of
2623
2658
# the moved messages.
2624
2659
#
2660
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] is enabled, the
2661
+ # +MOVE+ command is prohibited. Use #uid_move instead.
2625
2662
def move ( set , mailbox )
2626
2663
copy_internal ( "MOVE" , set , mailbox )
2627
2664
end
@@ -2637,9 +2674,13 @@ def move(set, mailbox)
2637
2674
#
2638
2675
# ==== Capabilities
2639
2676
#
2640
- # Same as #move: The server's capabilities must include +MOVE+
2641
- # [RFC6851[https://tools.ietf.org/html/rfc6851]]. +UIDPLUS+ also affects
2642
- # #uid_move the same way it affects #move.
2677
+ # The server's capabilities must include either +IMAP4rev2+ or +MOVE+
2678
+ # [RFC6851[https://tools.ietf.org/html/rfc6851]].
2679
+ #
2680
+ # When UIDONLY[https://www.rfc-editor.org/rfc/rfc9586.html] has been
2681
+ # enabled, #uid_move must be used instead of #move.
2682
+ #
2683
+ # Otherwise, #uid_move is updated by extensions in the same way as #move.
2643
2684
def uid_move ( set , mailbox )
2644
2685
copy_internal ( "UID MOVE" , set , mailbox )
2645
2686
end
0 commit comments