mail 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of mail might be problematic. Click here for more details.
- data/Rakefile +1 -1
- data/lib/mail/fields/bcc_field.rb +2 -0
- data/lib/mail/fields/cc_field.rb +2 -0
- data/lib/mail/fields/comments_field.rb +3 -0
- data/lib/mail/fields/common/common_address.rb +8 -0
- data/lib/mail/fields/common/common_date.rb +9 -0
- data/lib/mail/fields/common/common_message_id.rb +9 -5
- data/lib/mail/fields/content_description_field.rb +3 -0
- data/lib/mail/fields/content_disposition_field.rb +7 -3
- data/lib/mail/fields/content_id_field.rb +7 -4
- data/lib/mail/fields/content_location_field.rb +7 -3
- data/lib/mail/fields/content_transfer_encoding_field.rb +9 -2
- data/lib/mail/fields/content_type_field.rb +8 -3
- data/lib/mail/fields/from_field.rb +3 -0
- data/lib/mail/fields/in_reply_to_field.rb +2 -0
- data/lib/mail/fields/keywords_field.rb +8 -0
- data/lib/mail/fields/message_id_field.rb +3 -1
- data/lib/mail/fields/mime_version_field.rb +8 -5
- data/lib/mail/fields/received_field.rb +8 -4
- data/lib/mail/fields/references_field.rb +3 -0
- data/lib/mail/fields/reply_to_field.rb +3 -0
- data/lib/mail/fields/resent_bcc_field.rb +3 -0
- data/lib/mail/fields/resent_cc_field.rb +3 -0
- data/lib/mail/fields/resent_from_field.rb +3 -0
- data/lib/mail/fields/resent_message_id_field.rb +3 -0
- data/lib/mail/fields/resent_sender_field.rb +3 -0
- data/lib/mail/fields/resent_to_field.rb +3 -0
- data/lib/mail/fields/return_path_field.rb +3 -0
- data/lib/mail/fields/sender_field.rb +3 -0
- data/lib/mail/fields/to_field.rb +3 -0
- data/lib/mail/fields/unstructured_field.rb +4 -0
- data/lib/mail/version.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/mail/fields/cc_field.rb
CHANGED
@@ -8,6 +8,14 @@ module Mail
|
|
8
8
|
|
9
9
|
module InstanceMethods # :doc:
|
10
10
|
|
11
|
+
def parse(val = value)
|
12
|
+
unless val.blank?
|
13
|
+
@tree ||= AddressList.new(value)
|
14
|
+
else
|
15
|
+
nil
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
11
19
|
# Allows you to iterate through each address object in the syntax tree
|
12
20
|
def each
|
13
21
|
tree.addresses.each do |address|
|
@@ -7,15 +7,19 @@ module Mail
|
|
7
7
|
end
|
8
8
|
|
9
9
|
module InstanceMethods # :doc:
|
10
|
-
|
11
|
-
def tree
|
12
|
-
@tree ||= element.tree
|
13
|
-
end
|
14
|
-
|
10
|
+
|
15
11
|
def element
|
16
12
|
@element ||= Mail::MessageIdsElement.new(value)
|
17
13
|
end
|
18
14
|
|
15
|
+
def parse(val = value)
|
16
|
+
unless val.blank?
|
17
|
+
@element = Mail::MessageIdsElement.new(val)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
19
23
|
def message_id
|
20
24
|
element.message_id
|
21
25
|
end
|
@@ -10,11 +10,15 @@ module Mail
|
|
10
10
|
|
11
11
|
def initialize(*args)
|
12
12
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
|
13
|
+
self.parse
|
14
|
+
self
|
15
|
+
|
13
16
|
end
|
14
17
|
|
15
|
-
def
|
16
|
-
|
17
|
-
|
18
|
+
def parse(val = value)
|
19
|
+
unless val.blank?
|
20
|
+
@element = Mail::ContentDispositionElement.new(val)
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
def element
|
@@ -13,15 +13,18 @@ module Mail
|
|
13
13
|
if args.last.blank?
|
14
14
|
self.name = CAPITALIZED_FIELD
|
15
15
|
self.value = generate_content_id
|
16
|
-
self
|
17
16
|
else
|
18
17
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
|
19
18
|
end
|
19
|
+
self.parse
|
20
|
+
self
|
21
|
+
|
20
22
|
end
|
21
23
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
24
|
+
def parse(val = value)
|
25
|
+
unless val.blank?
|
26
|
+
@element = Mail::MessageIdsElement.new(val)
|
27
|
+
end
|
25
28
|
end
|
26
29
|
|
27
30
|
def element
|
@@ -10,11 +10,15 @@ module Mail
|
|
10
10
|
|
11
11
|
def initialize(*args)
|
12
12
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
|
13
|
+
self.parse
|
14
|
+
self
|
15
|
+
|
13
16
|
end
|
14
17
|
|
15
|
-
def
|
16
|
-
|
17
|
-
|
18
|
+
def parse(val = value)
|
19
|
+
unless val.blank?
|
20
|
+
@element = Mail::ContentLocationElement.new(val)
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
def element
|
@@ -12,13 +12,20 @@ module Mail
|
|
12
12
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last.to_s.downcase))
|
13
13
|
end
|
14
14
|
|
15
|
+
def parse(val = value)
|
16
|
+
unless val.blank?
|
17
|
+
@element = Mail::ContentTransferEncodingElement.new(val)
|
18
|
+
@tree = @element.tree
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
15
22
|
def tree
|
16
|
-
@element ||= ContentTransferEncodingElement.new(value)
|
23
|
+
@element ||= Mail::ContentTransferEncodingElement.new(value)
|
17
24
|
@tree ||= @element.tree
|
18
25
|
end
|
19
26
|
|
20
27
|
def element
|
21
|
-
@element ||= ContentTransferEncodingElement.new(value)
|
28
|
+
@element ||= Mail::ContentTransferEncodingElement.new(value)
|
22
29
|
end
|
23
30
|
|
24
31
|
def encoding
|
@@ -20,11 +20,16 @@ module Mail
|
|
20
20
|
@parameters = nil
|
21
21
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
|
22
22
|
end
|
23
|
+
self.parse
|
24
|
+
self
|
23
25
|
end
|
24
26
|
|
25
|
-
def
|
26
|
-
|
27
|
-
|
27
|
+
def parse(val = value)
|
28
|
+
unless val.blank?
|
29
|
+
self.value = val
|
30
|
+
@element = nil
|
31
|
+
element
|
32
|
+
end
|
28
33
|
end
|
29
34
|
|
30
35
|
def element
|
@@ -9,6 +9,14 @@ module Mail
|
|
9
9
|
|
10
10
|
def initialize(*args)
|
11
11
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
|
12
|
+
self.parse
|
13
|
+
self
|
14
|
+
end
|
15
|
+
|
16
|
+
def parse(val = value)
|
17
|
+
unless val.blank?
|
18
|
+
@phrase_list ||= PhraseList.new(value)
|
19
|
+
end
|
12
20
|
end
|
13
21
|
|
14
22
|
def phrase_list
|
@@ -12,19 +12,22 @@ module Mail
|
|
12
12
|
if args.last.blank?
|
13
13
|
self.name = CAPITALIZED_FIELD
|
14
14
|
self.value = '1.0'
|
15
|
-
self
|
16
15
|
else
|
17
16
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
|
18
17
|
end
|
18
|
+
self.parse
|
19
|
+
self
|
20
|
+
|
19
21
|
end
|
20
22
|
|
21
|
-
def
|
22
|
-
|
23
|
-
|
23
|
+
def parse(val = value)
|
24
|
+
unless val.blank?
|
25
|
+
@element = Mail::MimeVersionElement.new(val)
|
26
|
+
end
|
24
27
|
end
|
25
28
|
|
26
29
|
def element
|
27
|
-
@element ||= MimeVersionElement.new(value)
|
30
|
+
@element ||= Mail::MimeVersionElement.new(value)
|
28
31
|
end
|
29
32
|
|
30
33
|
def version
|
@@ -27,15 +27,19 @@ module Mail
|
|
27
27
|
|
28
28
|
def initialize(*args)
|
29
29
|
super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
|
30
|
+
self.parse
|
31
|
+
self
|
32
|
+
|
30
33
|
end
|
31
34
|
|
32
|
-
def
|
33
|
-
|
34
|
-
|
35
|
+
def parse(val = value)
|
36
|
+
unless val.blank?
|
37
|
+
@element = Mail::ReceivedElement.new(val)
|
38
|
+
end
|
35
39
|
end
|
36
40
|
|
37
41
|
def element
|
38
|
-
@element ||= ReceivedElement.new(value)
|
42
|
+
@element ||= Mail::ReceivedElement.new(value)
|
39
43
|
end
|
40
44
|
|
41
45
|
def date_time
|
data/lib/mail/fields/to_field.rb
CHANGED
data/lib/mail/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Lindsaar
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-12 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|