net-imap 0.6.6 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.simplecov +3 -2
- data/Gemfile +2 -2
- data/README.md +50 -24
- data/Rakefile +51 -4
- data/lib/net/imap/command_data.rb +13 -10
- data/lib/net/imap/config/attr_accessors.rb +2 -2
- data/lib/net/imap/config.rb +63 -3
- data/lib/net/imap/esearch_result.rb +2 -2
- data/lib/net/imap/fetch_data.rb +5 -5
- data/lib/net/imap/response_data.rb +79 -79
- data/lib/net/imap/response_parser.rb +2 -1
- data/lib/net/imap/sasl/client_adapter.rb +6 -6
- data/lib/net/imap/search_result.rb +4 -6
- data/lib/net/imap/sequence_set.rb +251 -8
- data/lib/net/imap.rb +194 -45
- data/rakelib/rdoc.rake +24 -0
- metadata +2 -2
|
@@ -19,13 +19,13 @@ module Net
|
|
|
19
19
|
#
|
|
20
20
|
class ContinuationRequest < Struct.new(:data, :raw_data)
|
|
21
21
|
##
|
|
22
|
-
# method: data
|
|
22
|
+
# :method: data
|
|
23
23
|
# :call-seq: data -> ResponseText
|
|
24
24
|
#
|
|
25
25
|
# Returns a ResponseText object
|
|
26
26
|
|
|
27
27
|
##
|
|
28
|
-
# method: raw_data
|
|
28
|
+
# :method: raw_data
|
|
29
29
|
# :call-seq: raw_data -> string
|
|
30
30
|
#
|
|
31
31
|
# the raw response data
|
|
@@ -39,13 +39,13 @@ module Net
|
|
|
39
39
|
#
|
|
40
40
|
class UntaggedResponse < Struct.new(:name, :data, :raw_data)
|
|
41
41
|
##
|
|
42
|
-
# method: name
|
|
42
|
+
# :method: name
|
|
43
43
|
# :call-seq: name -> string
|
|
44
44
|
#
|
|
45
45
|
# The uppercase response name, e.g. "FLAGS", "LIST", "FETCH", etc.
|
|
46
46
|
|
|
47
47
|
##
|
|
48
|
-
# method: data
|
|
48
|
+
# :method: data
|
|
49
49
|
# :call-seq: data -> object or nil
|
|
50
50
|
#
|
|
51
51
|
# The parsed response data, e.g: an array of flag symbols, an array of
|
|
@@ -54,7 +54,7 @@ module Net
|
|
|
54
54
|
# determines what form the data can take.
|
|
55
55
|
|
|
56
56
|
##
|
|
57
|
-
# method: raw_data
|
|
57
|
+
# :method: raw_data
|
|
58
58
|
# :call-seq: raw_data -> string
|
|
59
59
|
#
|
|
60
60
|
# The raw response data.
|
|
@@ -89,7 +89,7 @@ module Net
|
|
|
89
89
|
# InvalidParseData.
|
|
90
90
|
class UnparsedData < Struct.new(:unparsed_data)
|
|
91
91
|
##
|
|
92
|
-
# method: unparsed_data
|
|
92
|
+
# :method: unparsed_data
|
|
93
93
|
# :call-seq: unparsed_data -> string
|
|
94
94
|
#
|
|
95
95
|
# The unparsed data
|
|
@@ -132,19 +132,19 @@ module Net
|
|
|
132
132
|
# See also: UnparsedData, ExtensionData
|
|
133
133
|
class InvalidParseData < Data.define(:parse_error, :unparsed_data, :parsed_data)
|
|
134
134
|
##
|
|
135
|
-
# method: parse_error
|
|
135
|
+
# :method: parse_error
|
|
136
136
|
# :call-seq: parse_error -> ResponseParseError
|
|
137
137
|
#
|
|
138
138
|
# Returns the rescued ResponseParseError.
|
|
139
139
|
|
|
140
140
|
##
|
|
141
|
-
# method: unparsed_data
|
|
141
|
+
# :method: unparsed_data
|
|
142
142
|
# :call-seq: unparsed_data -> string
|
|
143
143
|
#
|
|
144
144
|
# Returns the raw string which was skipped over by the parser.
|
|
145
145
|
|
|
146
146
|
##
|
|
147
|
-
# method: parsed_data
|
|
147
|
+
# :method: parsed_data
|
|
148
148
|
#
|
|
149
149
|
# May return a partial parse result for unparsed_data, which had already
|
|
150
150
|
# been parsed before the parse_error.
|
|
@@ -170,7 +170,7 @@ module Net
|
|
|
170
170
|
# See also: UnparsedData, ExtensionData, IgnoredResponse, InvalidParseData
|
|
171
171
|
class UnparsedNumericResponseData < Struct.new(:number, :unparsed_data)
|
|
172
172
|
##
|
|
173
|
-
# method: number
|
|
173
|
+
# :method: number
|
|
174
174
|
# :call-seq: number -> integer
|
|
175
175
|
#
|
|
176
176
|
# Returns a numeric response data prefix, when available.
|
|
@@ -180,7 +180,7 @@ module Net
|
|
|
180
180
|
# mailbox data, #number may represent a message count.
|
|
181
181
|
|
|
182
182
|
##
|
|
183
|
-
# method: unparsed_data
|
|
183
|
+
# :method: unparsed_data
|
|
184
184
|
# :call-seq: unparsed_data -> string
|
|
185
185
|
#
|
|
186
186
|
# The unparsed data, not including #number or UntaggedResponse#name.
|
|
@@ -197,7 +197,7 @@ module Net
|
|
|
197
197
|
# See also: UnparsedData, UnparsedNumericResponseData, IgnoredResponse
|
|
198
198
|
class ExtensionData < Struct.new(:data)
|
|
199
199
|
##
|
|
200
|
-
# method: data
|
|
200
|
+
# :method: data
|
|
201
201
|
# :call-seq: data -> string
|
|
202
202
|
#
|
|
203
203
|
# The parsed extension data.
|
|
@@ -211,25 +211,25 @@ module Net
|
|
|
211
211
|
#
|
|
212
212
|
class TaggedResponse < Struct.new(:tag, :name, :data, :raw_data)
|
|
213
213
|
##
|
|
214
|
-
# method: tag
|
|
214
|
+
# :method: tag
|
|
215
215
|
# :call-seq: tag -> string
|
|
216
216
|
#
|
|
217
217
|
# Returns the command tag
|
|
218
218
|
|
|
219
219
|
##
|
|
220
|
-
# method: name
|
|
220
|
+
# :method: name
|
|
221
221
|
# :call-seq: name -> string
|
|
222
222
|
#
|
|
223
223
|
# Returns the name, one of "OK", "NO", or "BAD".
|
|
224
224
|
|
|
225
225
|
##
|
|
226
|
-
# method: data
|
|
226
|
+
# :method: data
|
|
227
227
|
# :call-seq: data -> ResponseText
|
|
228
228
|
#
|
|
229
229
|
# Returns a ResponseText object
|
|
230
230
|
|
|
231
231
|
##
|
|
232
|
-
# method: raw_data
|
|
232
|
+
# :method: raw_data
|
|
233
233
|
# :call-seq: raw_data -> string
|
|
234
234
|
#
|
|
235
235
|
# The raw response data.
|
|
@@ -254,13 +254,13 @@ module Net
|
|
|
254
254
|
EMPTY = new(nil, "").freeze
|
|
255
255
|
|
|
256
256
|
##
|
|
257
|
-
# method: code
|
|
257
|
+
# :method: code
|
|
258
258
|
# :call-seq: code -> ResponseCode or nil
|
|
259
259
|
#
|
|
260
260
|
# Returns a ResponseCode, if the response contains one
|
|
261
261
|
|
|
262
262
|
##
|
|
263
|
-
# method: text
|
|
263
|
+
# :method: text
|
|
264
264
|
# :call-seq: text -> string
|
|
265
265
|
#
|
|
266
266
|
# Returns the response text, not including any response code
|
|
@@ -412,14 +412,14 @@ module Net
|
|
|
412
412
|
# response code data, #data returns InvalidParseData.
|
|
413
413
|
class ResponseCode < Struct.new(:name, :data)
|
|
414
414
|
##
|
|
415
|
-
# method: name
|
|
415
|
+
# :method: name
|
|
416
416
|
# :call-seq: name -> string
|
|
417
417
|
#
|
|
418
418
|
# Returns the response code name, such as "ALERT", "PERMANENTFLAGS", or
|
|
419
419
|
# "UIDVALIDITY".
|
|
420
420
|
|
|
421
421
|
##
|
|
422
|
-
# method: data
|
|
422
|
+
# :method: data
|
|
423
423
|
# :call-seq: data -> object or nil
|
|
424
424
|
#
|
|
425
425
|
# Returns the parsed response code data, e.g: an array of capabilities
|
|
@@ -438,7 +438,7 @@ module Net
|
|
|
438
438
|
#
|
|
439
439
|
class MailboxList < Struct.new(:attr, :delim, :name)
|
|
440
440
|
##
|
|
441
|
-
# method: attr
|
|
441
|
+
# :method: attr
|
|
442
442
|
# :call-seq: attr -> array of Symbols
|
|
443
443
|
#
|
|
444
444
|
# Returns the name attributes. Each name attribute is a symbol capitalized
|
|
@@ -451,13 +451,13 @@ module Net
|
|
|
451
451
|
# has links to specifications for all standard mailbox attributes.
|
|
452
452
|
|
|
453
453
|
##
|
|
454
|
-
# method: delim
|
|
454
|
+
# :method: delim
|
|
455
455
|
# :call-seq: delim -> single character string
|
|
456
456
|
#
|
|
457
457
|
# Returns the hierarchy delimiter for the mailbox path.
|
|
458
458
|
|
|
459
459
|
##
|
|
460
|
-
# method: name
|
|
460
|
+
# :method: name
|
|
461
461
|
# :call-seq: name -> string
|
|
462
462
|
#
|
|
463
463
|
# Returns the mailbox name.
|
|
@@ -477,7 +477,7 @@ module Net
|
|
|
477
477
|
# [RFC9208[https://www.rfc-editor.org/rfc/rfc9208]] capability.
|
|
478
478
|
class MailboxQuota < Struct.new(:mailbox, :usage, :quota)
|
|
479
479
|
##
|
|
480
|
-
# method: mailbox
|
|
480
|
+
# :method: mailbox
|
|
481
481
|
# :call-seq: mailbox -> string
|
|
482
482
|
#
|
|
483
483
|
# The quota root with the associated quota.
|
|
@@ -490,13 +490,13 @@ module Net
|
|
|
490
490
|
alias quota_root mailbox
|
|
491
491
|
|
|
492
492
|
##
|
|
493
|
-
# method: usage
|
|
493
|
+
# :method: usage
|
|
494
494
|
# :call-seq: usage -> Integer
|
|
495
495
|
#
|
|
496
496
|
# Current storage usage of the mailbox.
|
|
497
497
|
|
|
498
498
|
##
|
|
499
|
-
# method: quota
|
|
499
|
+
# :method: quota
|
|
500
500
|
# :call-seq: quota -> Integer
|
|
501
501
|
#
|
|
502
502
|
# Storage limit imposed on the mailbox.
|
|
@@ -513,13 +513,13 @@ module Net
|
|
|
513
513
|
# capability.
|
|
514
514
|
class MailboxQuotaRoot < Struct.new(:mailbox, :quotaroots)
|
|
515
515
|
##
|
|
516
|
-
# method: mailbox
|
|
516
|
+
# :method: mailbox
|
|
517
517
|
# :call-seq: mailbox -> string
|
|
518
518
|
#
|
|
519
519
|
# The mailbox with the associated quota.
|
|
520
520
|
|
|
521
521
|
##
|
|
522
|
-
# method: mailbox
|
|
522
|
+
# :method: mailbox
|
|
523
523
|
# :call-seq: quotaroots -> array of strings
|
|
524
524
|
#
|
|
525
525
|
# Zero or more quotaroots that affect the quota on the specified mailbox.
|
|
@@ -534,20 +534,20 @@ module Net
|
|
|
534
534
|
# capability.
|
|
535
535
|
class MailboxACLItem < Struct.new(:user, :rights, :mailbox)
|
|
536
536
|
##
|
|
537
|
-
# method: mailbox
|
|
537
|
+
# :method: mailbox
|
|
538
538
|
# :call-seq: mailbox -> string
|
|
539
539
|
#
|
|
540
540
|
# The mailbox to which the indicated #user has the specified #rights.
|
|
541
541
|
|
|
542
542
|
##
|
|
543
|
-
# method: user
|
|
543
|
+
# :method: user
|
|
544
544
|
# :call-seq: user -> string
|
|
545
545
|
#
|
|
546
546
|
# Login name that has certain #rights to the #mailbox that was specified
|
|
547
547
|
# with the getacl command.
|
|
548
548
|
|
|
549
549
|
##
|
|
550
|
-
# method: rights
|
|
550
|
+
# :method: rights
|
|
551
551
|
# :call-seq: rights -> string
|
|
552
552
|
#
|
|
553
553
|
# The access rights the indicated #user has to the #mailbox.
|
|
@@ -561,19 +561,19 @@ module Net
|
|
|
561
561
|
# or +IMAP4rev2+ capability.
|
|
562
562
|
class Namespace < Struct.new(:prefix, :delim, :extensions)
|
|
563
563
|
##
|
|
564
|
-
# method: prefix
|
|
564
|
+
# :method: prefix
|
|
565
565
|
# :call-seq: prefix -> string
|
|
566
566
|
#
|
|
567
567
|
# Returns the namespace prefix string.
|
|
568
568
|
|
|
569
569
|
##
|
|
570
|
-
# method: delim
|
|
570
|
+
# :method: delim
|
|
571
571
|
# :call-seq: delim -> single character string or nil
|
|
572
572
|
#
|
|
573
573
|
# Returns a hierarchy delimiter character, if it exists.
|
|
574
574
|
|
|
575
575
|
##
|
|
576
|
-
# method: extensions
|
|
576
|
+
# :method: extensions
|
|
577
577
|
# :call-seq: extensions -> Hash[String, Array[String]]
|
|
578
578
|
#
|
|
579
579
|
# A hash of parameters mapped to arrays of strings, for extensibility.
|
|
@@ -590,19 +590,19 @@ module Net
|
|
|
590
590
|
# or +IMAP4rev2+ capability.
|
|
591
591
|
class Namespaces < Struct.new(:personal, :other, :shared)
|
|
592
592
|
##
|
|
593
|
-
# method: personal
|
|
593
|
+
# :method: personal
|
|
594
594
|
# :call-seq: personal -> array of Namespace
|
|
595
595
|
#
|
|
596
596
|
# Returns an array of Personal Namespace objects.
|
|
597
597
|
|
|
598
598
|
##
|
|
599
|
-
# method: other
|
|
599
|
+
# :method: other
|
|
600
600
|
# :call-seq: other -> array of Namespace
|
|
601
601
|
#
|
|
602
602
|
# Returns an array of Other Users' Namespace objects.
|
|
603
603
|
|
|
604
604
|
##
|
|
605
|
-
# method: shared
|
|
605
|
+
# :method: shared
|
|
606
606
|
# :call-seq: shared -> array of Namespace
|
|
607
607
|
#
|
|
608
608
|
# Returns an array of Shared Namespace objects.
|
|
@@ -613,13 +613,13 @@ module Net
|
|
|
613
613
|
# IMAP#status returns the contents of #attr.
|
|
614
614
|
class StatusData < Struct.new(:mailbox, :attr)
|
|
615
615
|
##
|
|
616
|
-
# method: mailbox
|
|
616
|
+
# :method: mailbox
|
|
617
617
|
# :call-seq: mailbox -> string
|
|
618
618
|
#
|
|
619
619
|
# The mailbox name.
|
|
620
620
|
|
|
621
621
|
##
|
|
622
|
-
# method: attr
|
|
622
|
+
# :method: attr
|
|
623
623
|
# :call-seq: attr -> Hash[String, Integer]
|
|
624
624
|
#
|
|
625
625
|
# A hash. Each key is one of "MESSAGES", "RECENT", "UIDNEXT",
|
|
@@ -643,7 +643,7 @@ module Net
|
|
|
643
643
|
class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
|
|
644
644
|
:to, :cc, :bcc, :in_reply_to, :message_id)
|
|
645
645
|
##
|
|
646
|
-
# method: date
|
|
646
|
+
# :method: date
|
|
647
647
|
# call-seq: date -> string
|
|
648
648
|
#
|
|
649
649
|
# Returns a string that represents the +Date+ header.
|
|
@@ -654,7 +654,7 @@ module Net
|
|
|
654
654
|
# for a malformed or draft message.
|
|
655
655
|
|
|
656
656
|
##
|
|
657
|
-
# method: subject
|
|
657
|
+
# :method: subject
|
|
658
658
|
# call-seq: subject -> string or nil
|
|
659
659
|
#
|
|
660
660
|
# Returns a string that represents the +Subject+ header, if it is present.
|
|
@@ -666,7 +666,7 @@ module Net
|
|
|
666
666
|
# +nil+ and empty string as identical.
|
|
667
667
|
|
|
668
668
|
##
|
|
669
|
-
# method: from
|
|
669
|
+
# :method: from
|
|
670
670
|
# call-seq: from -> array of Net::IMAP::Address or nil
|
|
671
671
|
#
|
|
672
672
|
# Returns an array of Address that represents the +From+ header.
|
|
@@ -680,7 +680,7 @@ module Net
|
|
|
680
680
|
# for a malformed or draft message.
|
|
681
681
|
|
|
682
682
|
##
|
|
683
|
-
# method: sender
|
|
683
|
+
# :method: sender
|
|
684
684
|
# call-seq: sender -> array of Net::IMAP::Address or nil
|
|
685
685
|
#
|
|
686
686
|
# Returns an array of Address that represents the +Sender+ header.
|
|
@@ -693,7 +693,7 @@ module Net
|
|
|
693
693
|
# +nil+ for a malformed or draft message.
|
|
694
694
|
|
|
695
695
|
##
|
|
696
|
-
# method: reply_to
|
|
696
|
+
# :method: reply_to
|
|
697
697
|
# call-seq: reply_to -> array of Net::IMAP::Address or nil
|
|
698
698
|
#
|
|
699
699
|
# Returns an array of Address that represents the <tt>Reply-To</tt>
|
|
@@ -707,25 +707,25 @@ module Net
|
|
|
707
707
|
# can be +nil+ for a malformed or draft message.
|
|
708
708
|
|
|
709
709
|
##
|
|
710
|
-
# method: to
|
|
710
|
+
# :method: to
|
|
711
711
|
# call-seq: to -> array of Net::IMAP::Address
|
|
712
712
|
#
|
|
713
713
|
# Returns an array of Address that represents the +To+ header.
|
|
714
714
|
|
|
715
715
|
##
|
|
716
|
-
# method: cc
|
|
716
|
+
# :method: cc
|
|
717
717
|
# call-seq: cc -> array of Net::IMAP::Address
|
|
718
718
|
#
|
|
719
719
|
# Returns an array of Address that represents the +Cc+ header.
|
|
720
720
|
|
|
721
721
|
##
|
|
722
|
-
# method: bcc
|
|
722
|
+
# :method: bcc
|
|
723
723
|
# call-seq: bcc -> array of Net::IMAP::Address
|
|
724
724
|
#
|
|
725
725
|
# Returns an array of Address that represents the +Bcc+ header.
|
|
726
726
|
|
|
727
727
|
##
|
|
728
|
-
# method: in_reply_to
|
|
728
|
+
# :method: in_reply_to
|
|
729
729
|
# call-seq: in_reply_to -> string
|
|
730
730
|
#
|
|
731
731
|
# Returns a string that represents the <tt>In-Reply-To</tt> header.
|
|
@@ -741,7 +741,7 @@ module Net
|
|
|
741
741
|
# +nil+ and empty string as identical.
|
|
742
742
|
|
|
743
743
|
##
|
|
744
|
-
# method: message_id
|
|
744
|
+
# :method: message_id
|
|
745
745
|
# call-seq: message_id -> string
|
|
746
746
|
#
|
|
747
747
|
# Returns a string that represents the <tt>Message-ID</tt>.
|
|
@@ -771,14 +771,14 @@ module Net
|
|
|
771
771
|
# field holds the group name phrase.
|
|
772
772
|
class Address < Struct.new(:name, :route, :mailbox, :host)
|
|
773
773
|
##
|
|
774
|
-
# method: name
|
|
774
|
+
# :method: name
|
|
775
775
|
# :call-seq: name -> string or nil
|
|
776
776
|
#
|
|
777
777
|
# Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] address
|
|
778
778
|
# +display-name+ (or the mailbox +phrase+ in the RFC-822 grammar).
|
|
779
779
|
|
|
780
780
|
##
|
|
781
|
-
# method: route
|
|
781
|
+
# :method: route
|
|
782
782
|
# :call-seq: route -> string or nil
|
|
783
783
|
#
|
|
784
784
|
# Returns the route from RFC-822 route-addr.
|
|
@@ -788,7 +788,7 @@ module Net
|
|
|
788
788
|
# addresses with this syntax must still be accepted and parsed.
|
|
789
789
|
|
|
790
790
|
##
|
|
791
|
-
# method: mailbox
|
|
791
|
+
# :method: mailbox
|
|
792
792
|
# :call-seq: mailbox -> string or nil
|
|
793
793
|
#
|
|
794
794
|
# Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] address
|
|
@@ -799,7 +799,7 @@ module Net
|
|
|
799
799
|
# mailbox indicates the end of a group.
|
|
800
800
|
|
|
801
801
|
##
|
|
802
|
-
# method: host
|
|
802
|
+
# :method: host
|
|
803
803
|
# :call-seq: host -> string or nil
|
|
804
804
|
#
|
|
805
805
|
# Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] addr-spec
|
|
@@ -813,14 +813,14 @@ module Net
|
|
|
813
813
|
#
|
|
814
814
|
class ContentDisposition < Struct.new(:dsp_type, :param)
|
|
815
815
|
##
|
|
816
|
-
# method: dsp_type
|
|
816
|
+
# :method: dsp_type
|
|
817
817
|
# :call-seq: dsp_type -> string
|
|
818
818
|
#
|
|
819
819
|
# Returns the content disposition type, as defined by
|
|
820
820
|
# [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].
|
|
821
821
|
|
|
822
822
|
##
|
|
823
|
-
# method: param
|
|
823
|
+
# :method: param
|
|
824
824
|
# :call-seq: param -> hash
|
|
825
825
|
#
|
|
826
826
|
# Returns a hash representing parameters of the Content-Disposition
|
|
@@ -832,13 +832,13 @@ module Net
|
|
|
832
832
|
#
|
|
833
833
|
class ThreadMember < Struct.new(:seqno, :children)
|
|
834
834
|
##
|
|
835
|
-
# method: seqno
|
|
835
|
+
# :method: seqno
|
|
836
836
|
# :call-seq: seqno -> Integer
|
|
837
837
|
#
|
|
838
838
|
# The message sequence number.
|
|
839
839
|
|
|
840
840
|
##
|
|
841
|
-
# method: children
|
|
841
|
+
# :method: children
|
|
842
842
|
# :call-seq: children -> array of ThreadMember
|
|
843
843
|
#
|
|
844
844
|
# An array of Net::IMAP::ThreadMember objects for mail items that are
|
|
@@ -900,28 +900,28 @@ module Net
|
|
|
900
900
|
include BodyStructure
|
|
901
901
|
|
|
902
902
|
##
|
|
903
|
-
# method: media_type
|
|
903
|
+
# :method: media_type
|
|
904
904
|
# :call-seq: media_type -> string
|
|
905
905
|
#
|
|
906
906
|
# The top-level media type as defined in
|
|
907
907
|
# [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
|
|
908
908
|
|
|
909
909
|
##
|
|
910
|
-
# method: subtype
|
|
910
|
+
# :method: subtype
|
|
911
911
|
# :call-seq: subtype -> string
|
|
912
912
|
#
|
|
913
913
|
# The media subtype name as defined in
|
|
914
914
|
# [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
|
|
915
915
|
|
|
916
916
|
##
|
|
917
|
-
# method: param
|
|
917
|
+
# :method: param
|
|
918
918
|
# :call-seq: param -> string
|
|
919
919
|
#
|
|
920
920
|
# Returns a hash that represents parameters as defined in
|
|
921
921
|
# [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
|
|
922
922
|
|
|
923
923
|
##
|
|
924
|
-
# method: content_id
|
|
924
|
+
# :method: content_id
|
|
925
925
|
# :call-seq: content_id -> string
|
|
926
926
|
#
|
|
927
927
|
# Returns a string giving the content id as defined
|
|
@@ -929,7 +929,7 @@ module Net
|
|
|
929
929
|
# {§7}[https://www.rfc-editor.org/rfc/rfc2045#section-7].
|
|
930
930
|
|
|
931
931
|
##
|
|
932
|
-
# method: description
|
|
932
|
+
# :method: description
|
|
933
933
|
# :call-seq: description -> string
|
|
934
934
|
#
|
|
935
935
|
# Returns a string giving the content description as defined
|
|
@@ -937,7 +937,7 @@ module Net
|
|
|
937
937
|
# {§8}[https://www.rfc-editor.org/rfc/rfc2045#section-8].
|
|
938
938
|
|
|
939
939
|
##
|
|
940
|
-
# method: encoding
|
|
940
|
+
# :method: encoding
|
|
941
941
|
# :call-seq: encoding -> string
|
|
942
942
|
#
|
|
943
943
|
# Returns a string giving the content transfer encoding as defined
|
|
@@ -945,20 +945,20 @@ module Net
|
|
|
945
945
|
# {§6}[https://www.rfc-editor.org/rfc/rfc2045#section-6].
|
|
946
946
|
|
|
947
947
|
##
|
|
948
|
-
# method: size
|
|
948
|
+
# :method: size
|
|
949
949
|
# :call-seq: size -> integer
|
|
950
950
|
#
|
|
951
951
|
# Returns a number giving the size of the body in octets.
|
|
952
952
|
|
|
953
953
|
##
|
|
954
|
-
# method: md5
|
|
954
|
+
# :method: md5
|
|
955
955
|
# :call-seq: md5 -> string
|
|
956
956
|
#
|
|
957
957
|
# Returns a string giving the body MD5 value as defined in
|
|
958
958
|
# [MD5[https://www.rfc-editor.org/rfc/rfc1864]].
|
|
959
959
|
|
|
960
960
|
##
|
|
961
|
-
# method: disposition
|
|
961
|
+
# :method: disposition
|
|
962
962
|
# :call-seq: disposition -> ContentDisposition
|
|
963
963
|
#
|
|
964
964
|
# Returns a ContentDisposition object giving the content
|
|
@@ -966,7 +966,7 @@ module Net
|
|
|
966
966
|
# [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].
|
|
967
967
|
|
|
968
968
|
##
|
|
969
|
-
# method: language
|
|
969
|
+
# :method: language
|
|
970
970
|
# :call-seq: language -> string
|
|
971
971
|
#
|
|
972
972
|
# Returns a string or an array of strings giving the body
|
|
@@ -975,7 +975,7 @@ module Net
|
|
|
975
975
|
|
|
976
976
|
#--
|
|
977
977
|
##
|
|
978
|
-
# method: location
|
|
978
|
+
# :method: location
|
|
979
979
|
# :call-seq: location -> string
|
|
980
980
|
#
|
|
981
981
|
# A string list giving the body content URI as defined in
|
|
@@ -983,7 +983,7 @@ module Net
|
|
|
983
983
|
#++
|
|
984
984
|
|
|
985
985
|
##
|
|
986
|
-
# method: extension
|
|
986
|
+
# :method: extension
|
|
987
987
|
# :call-seq: extension -> string
|
|
988
988
|
#
|
|
989
989
|
# Returns extension data. The +BODYSTRUCTURE+ fetch attribute
|
|
@@ -1037,7 +1037,7 @@ module Net
|
|
|
1037
1037
|
include BodyStructure
|
|
1038
1038
|
|
|
1039
1039
|
##
|
|
1040
|
-
# method: lines
|
|
1040
|
+
# :method: lines
|
|
1041
1041
|
# :call-seq: lines -> Integer
|
|
1042
1042
|
#
|
|
1043
1043
|
# Returns the size of the body in text lines.
|
|
@@ -1083,13 +1083,13 @@ module Net
|
|
|
1083
1083
|
include BodyStructure
|
|
1084
1084
|
|
|
1085
1085
|
##
|
|
1086
|
-
# method: envelope
|
|
1086
|
+
# :method: envelope
|
|
1087
1087
|
# :call-seq: envelope -> Envelope
|
|
1088
1088
|
#
|
|
1089
1089
|
# Returns a Net::IMAP::Envelope giving the envelope structure.
|
|
1090
1090
|
|
|
1091
1091
|
##
|
|
1092
|
-
# method: body
|
|
1092
|
+
# :method: body
|
|
1093
1093
|
# :call-seq: body -> BodyStructure
|
|
1094
1094
|
#
|
|
1095
1095
|
# Returns a Net::IMAP::BodyStructure for the message's body structure.
|
|
@@ -1121,41 +1121,41 @@ module Net
|
|
|
1121
1121
|
include BodyStructure
|
|
1122
1122
|
|
|
1123
1123
|
##
|
|
1124
|
-
# method: media_type
|
|
1124
|
+
# :method: media_type
|
|
1125
1125
|
# call-seq: media_type -> "multipart"
|
|
1126
1126
|
#
|
|
1127
1127
|
# BodyTypeMultipart is only used with <tt>multipart/*</tt> media types.
|
|
1128
1128
|
|
|
1129
1129
|
##
|
|
1130
|
-
# method: subtype
|
|
1130
|
+
# :method: subtype
|
|
1131
1131
|
# call-seq: subtype -> string
|
|
1132
1132
|
#
|
|
1133
1133
|
# Returns the content subtype name
|
|
1134
1134
|
# as defined in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
|
|
1135
1135
|
|
|
1136
1136
|
##
|
|
1137
|
-
# method: parts
|
|
1137
|
+
# :method: parts
|
|
1138
1138
|
# call-seq: parts -> array of BodyStructure objects
|
|
1139
1139
|
#
|
|
1140
1140
|
# Returns an array with a BodyStructure object for each part contained in
|
|
1141
1141
|
# this part.
|
|
1142
1142
|
|
|
1143
1143
|
##
|
|
1144
|
-
# method: param
|
|
1144
|
+
# :method: param
|
|
1145
1145
|
# call-seq: param -> hash
|
|
1146
1146
|
#
|
|
1147
1147
|
# Returns a hash that represents parameters
|
|
1148
1148
|
# as defined in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
|
|
1149
1149
|
|
|
1150
1150
|
##
|
|
1151
|
-
# method: disposition
|
|
1151
|
+
# :method: disposition
|
|
1152
1152
|
# call-seq: disposition -> ContentDisposition
|
|
1153
1153
|
#
|
|
1154
1154
|
# Returns a Net::IMAP::ContentDisposition object giving the content
|
|
1155
1155
|
# disposition.
|
|
1156
1156
|
|
|
1157
1157
|
##
|
|
1158
|
-
# method: language
|
|
1158
|
+
# :method: language
|
|
1159
1159
|
# :call-seq: language -> string
|
|
1160
1160
|
#
|
|
1161
1161
|
# Returns a string or an array of strings giving the body
|
|
@@ -1163,7 +1163,7 @@ module Net
|
|
|
1163
1163
|
# [LANGUAGE-TAGS[https://www.rfc-editor.org/info/rfc3282]].
|
|
1164
1164
|
|
|
1165
1165
|
##
|
|
1166
|
-
# method: extension
|
|
1166
|
+
# :method: extension
|
|
1167
1167
|
# call-seq: extension -> array
|
|
1168
1168
|
#
|
|
1169
1169
|
# Returns extension data as an array of numbers strings, and nested
|
|
@@ -1676,7 +1676,7 @@ module Net
|
|
|
1676
1676
|
def mailbox_data__status
|
|
1677
1677
|
resp_name = label("STATUS"); SP!
|
|
1678
1678
|
mbox_name = mailbox; SP!
|
|
1679
|
-
lpar; attr = status_att_list; rpar
|
|
1679
|
+
lpar; attr = peek_rpar? ? {} : status_att_list; rpar
|
|
1680
1680
|
UntaggedResponse.new(resp_name, StatusData.new(mbox_name, attr), @str)
|
|
1681
1681
|
end
|
|
1682
1682
|
|
|
@@ -1743,6 +1743,7 @@ module Net
|
|
|
1743
1743
|
when "SIZE" then number64 # RFC8483, RFC9051
|
|
1744
1744
|
when "HIGHESTMODSEQ" then mod_sequence_valzer # RFC7162
|
|
1745
1745
|
when "MAILBOXID" then parens__objectid # RFC8474
|
|
1746
|
+
when "APPENDLIMIT" then NIL? ? nil : number # RFC7889
|
|
1746
1747
|
else
|
|
1747
1748
|
number? || ExtensionData.new(tagged_ext_val)
|
|
1748
1749
|
end
|
|
@@ -64,12 +64,12 @@ module Net
|
|
|
64
64
|
def authenticate(...) AuthenticationExchange.authenticate(self, ...) end
|
|
65
65
|
|
|
66
66
|
##
|
|
67
|
-
# method: sasl_ir_capable?
|
|
67
|
+
# :method: sasl_ir_capable?
|
|
68
68
|
# Do the protocol, server, and client all support an initial response?
|
|
69
69
|
def_delegator :client, :sasl_ir_capable?
|
|
70
70
|
|
|
71
71
|
##
|
|
72
|
-
# method: auth_capable?
|
|
72
|
+
# :method: auth_capable?
|
|
73
73
|
# call-seq: auth_capable?(mechanism)
|
|
74
74
|
#
|
|
75
75
|
# Does the server advertise support for the +mechanism+?
|
|
@@ -94,12 +94,12 @@ module Net
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
##
|
|
97
|
-
# method: host
|
|
97
|
+
# :method: host
|
|
98
98
|
# The hostname to which the client connected.
|
|
99
99
|
def_delegator :client, :host
|
|
100
100
|
|
|
101
101
|
##
|
|
102
|
-
# method: port
|
|
102
|
+
# :method: port
|
|
103
103
|
# The destination port to which the client connected.
|
|
104
104
|
def_delegator :client, :port
|
|
105
105
|
|
|
@@ -108,12 +108,12 @@ module Net
|
|
|
108
108
|
def response_errors; [] end
|
|
109
109
|
|
|
110
110
|
##
|
|
111
|
-
# method: drop_connection
|
|
111
|
+
# :method: drop_connection
|
|
112
112
|
# Drop the connection gracefully, sending a "LOGOUT" command as needed.
|
|
113
113
|
def_delegator :client, :drop_connection
|
|
114
114
|
|
|
115
115
|
##
|
|
116
|
-
# method: drop_connection!
|
|
116
|
+
# :method: drop_connection!
|
|
117
117
|
# Drop the connection abruptly, closing the socket without logging out.
|
|
118
118
|
def_delegator :client, :drop_connection!
|
|
119
119
|
|