mail 1.5.3 → 1.5.4
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/body.rb +4 -0
- data/lib/mail/elements/address_list.rb +9 -1
- data/lib/mail/fields/common/common_address.rb +8 -4
- data/lib/mail/version.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/mail/body.rb
CHANGED
@@ -60,7 +60,15 @@ module Mail
|
|
60
60
|
private
|
61
61
|
|
62
62
|
def get_addresses
|
63
|
-
(individual_recipients + group_recipients.map { |g| g
|
63
|
+
(individual_recipients + group_recipients.map { |g| get_group_addresses(g) }).flatten
|
64
|
+
end
|
65
|
+
|
66
|
+
def get_group_addresses(g)
|
67
|
+
if g.group_list.respond_to?(:addresses)
|
68
|
+
g.group_list.addresses
|
69
|
+
else
|
70
|
+
[]
|
71
|
+
end
|
64
72
|
end
|
65
73
|
end
|
66
74
|
end
|
@@ -37,7 +37,7 @@ module Mail
|
|
37
37
|
def groups
|
38
38
|
@groups = Hash.new
|
39
39
|
tree.group_recipients.each do |group|
|
40
|
-
@groups[group.group_name.text_value] = get_group_addresses(group.group_list
|
40
|
+
@groups[group.group_name.text_value] = get_group_addresses(group.group_list)
|
41
41
|
end
|
42
42
|
@groups
|
43
43
|
end
|
@@ -87,9 +87,13 @@ module Mail
|
|
87
87
|
@tree ||= AddressList.new(value)
|
88
88
|
end
|
89
89
|
|
90
|
-
def get_group_addresses(
|
91
|
-
|
92
|
-
|
90
|
+
def get_group_addresses(group_list)
|
91
|
+
if group_list.respond_to?(:addresses)
|
92
|
+
group_list.addresses.map do |address_tree|
|
93
|
+
Mail::Address.new(address_tree)
|
94
|
+
end
|
95
|
+
else
|
96
|
+
[]
|
93
97
|
end
|
94
98
|
end
|
95
99
|
|
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.4
|
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-14 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|