mail 2.2.19 → 2.2.20
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/CHANGELOG.rdoc +4 -0
- data/lib/VERSION +1 -1
- data/lib/mail/message.rb +27 -7
- metadata +183 -215
data/CHANGELOG.rdoc
CHANGED
data/lib/VERSION
CHANGED
data/lib/mail/message.rb
CHANGED
@@ -1711,19 +1711,39 @@ module Mail
|
|
1711
1711
|
buffer
|
1712
1712
|
end
|
1713
1713
|
|
1714
|
-
def to_yaml
|
1715
|
-
ready_to_send!
|
1714
|
+
def to_yaml(opts = {})
|
1716
1715
|
hash = {}
|
1716
|
+
hash['headers'] = {}
|
1717
1717
|
header.fields.each do |field|
|
1718
|
-
hash[field.name] = field.value
|
1718
|
+
hash['headers'][field.name] = field.value
|
1719
|
+
end
|
1720
|
+
hash['delivery_handler'] = delivery_handler.to_s if delivery_handler
|
1721
|
+
hash['transport_encoding'] = transport_encoding.to_s
|
1722
|
+
special_variables = [:@header, :@delivery_handler, :@transport_encoding]
|
1723
|
+
(instance_variables.map(&:to_sym) - special_variables).each do |var|
|
1724
|
+
hash[var.to_s] = instance_variable_get(var)
|
1719
1725
|
end
|
1720
|
-
hash
|
1721
|
-
hash['body'] = body.encoded(content_transfer_encoding)
|
1722
|
-
hash.to_yaml
|
1726
|
+
hash.to_yaml(opts)
|
1723
1727
|
end
|
1724
1728
|
|
1725
1729
|
def self.from_yaml(str)
|
1726
|
-
|
1730
|
+
hash = YAML.load(str)
|
1731
|
+
m = Mail::Message.new(:headers => hash['headers'])
|
1732
|
+
hash.delete('headers')
|
1733
|
+
hash.each do |k,v|
|
1734
|
+
case
|
1735
|
+
when k == 'delivery_handler'
|
1736
|
+
begin
|
1737
|
+
m.delivery_handler = Object.const_get(v) unless v.blank?
|
1738
|
+
rescue NameError
|
1739
|
+
end
|
1740
|
+
when k == 'transport_encoding'
|
1741
|
+
m.transport_encoding(v)
|
1742
|
+
when k =~ /^@/
|
1743
|
+
m.instance_variable_set(k.to_sym, v)
|
1744
|
+
end
|
1745
|
+
end
|
1746
|
+
m
|
1727
1747
|
end
|
1728
1748
|
|
1729
1749
|
def self.from_hash(hash)
|
metadata
CHANGED
@@ -1,86 +1,61 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 33
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 2
|
8
|
-
- 2
|
9
|
-
- 19
|
10
|
-
version: 2.2.19
|
5
|
+
version: 2.2.20
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
|
-
- Mikel Lindsaar
|
8
|
+
- Mikel Lindsaar
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
13
|
+
date: 2013-05-14 00:00:00 Z
|
20
14
|
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
version: 1.4.8
|
66
|
-
type: :runtime
|
67
|
-
version_requirements: *id003
|
68
|
-
- !ruby/object:Gem::Dependency
|
69
|
-
name: i18n
|
70
|
-
prerelease: false
|
71
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
hash: 15
|
77
|
-
segments:
|
78
|
-
- 0
|
79
|
-
- 4
|
80
|
-
- 0
|
81
|
-
version: 0.4.0
|
82
|
-
type: :runtime
|
83
|
-
version_requirements: *id004
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: activesupport
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.3.6
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: mime-types
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "1.16"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: treetop
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.4.8
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: i18n
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 0.4.0
|
57
|
+
type: :runtime
|
58
|
+
version_requirements: *id004
|
84
59
|
description: A really Ruby Mail handler.
|
85
60
|
email: raasdnil@gmail.com
|
86
61
|
executables: []
|
@@ -88,136 +63,135 @@ executables: []
|
|
88
63
|
extensions: []
|
89
64
|
|
90
65
|
extra_rdoc_files:
|
91
|
-
- README.rdoc
|
92
|
-
- CHANGELOG.rdoc
|
93
|
-
- TODO.rdoc
|
66
|
+
- README.rdoc
|
67
|
+
- CHANGELOG.rdoc
|
68
|
+
- TODO.rdoc
|
94
69
|
files:
|
95
|
-
- README.rdoc
|
96
|
-
- Rakefile
|
97
|
-
- TODO.rdoc
|
98
|
-
- lib/mail
|
99
|
-
- lib/
|
100
|
-
- lib/mail/
|
101
|
-
- lib/mail/
|
102
|
-
- lib/mail/
|
103
|
-
- lib/mail/
|
104
|
-
- lib/mail/
|
105
|
-
- lib/mail/
|
106
|
-
- lib/mail/
|
107
|
-
- lib/mail/
|
108
|
-
- lib/mail/
|
109
|
-
- lib/mail/
|
110
|
-
- lib/mail/
|
111
|
-
- lib/mail/
|
112
|
-
- lib/mail/
|
113
|
-
- lib/mail/
|
114
|
-
- lib/mail/
|
115
|
-
- lib/mail/
|
116
|
-
- lib/mail/
|
117
|
-
- lib/mail/
|
118
|
-
- lib/mail/
|
119
|
-
- lib/mail/
|
120
|
-
- lib/mail/
|
121
|
-
- lib/mail/
|
122
|
-
- lib/mail/
|
123
|
-
- lib/mail/
|
124
|
-
- lib/mail/
|
125
|
-
- lib/mail/
|
126
|
-
- lib/mail/
|
127
|
-
- lib/mail/
|
128
|
-
- lib/mail/
|
129
|
-
- lib/mail/
|
130
|
-
- lib/mail/
|
131
|
-
- lib/mail/
|
132
|
-
- lib/mail/
|
133
|
-
- lib/mail/
|
134
|
-
- lib/mail/
|
135
|
-
- lib/mail/
|
136
|
-
- lib/mail/
|
137
|
-
- lib/mail/
|
138
|
-
- lib/mail/
|
139
|
-
- lib/mail/
|
140
|
-
- lib/mail/fields/
|
141
|
-
- lib/mail/fields/
|
142
|
-
- lib/mail/fields/
|
143
|
-
- lib/mail/fields/
|
144
|
-
- lib/mail/fields/
|
145
|
-
- lib/mail/fields/
|
146
|
-
- lib/mail/fields/
|
147
|
-
- lib/mail/fields/
|
148
|
-
- lib/mail/fields/
|
149
|
-
- lib/mail/fields/
|
150
|
-
- lib/mail/fields/
|
151
|
-
- lib/mail/fields/
|
152
|
-
- lib/mail/fields/
|
153
|
-
- lib/mail/fields/
|
154
|
-
- lib/mail/fields/
|
155
|
-
- lib/mail/fields/
|
156
|
-
- lib/mail/fields/
|
157
|
-
- lib/mail/fields/
|
158
|
-
- lib/mail/fields/
|
159
|
-
- lib/mail/fields/
|
160
|
-
- lib/mail/fields/
|
161
|
-
- lib/mail/fields/
|
162
|
-
- lib/mail/fields/
|
163
|
-
- lib/mail/fields/
|
164
|
-
- lib/mail/fields/
|
165
|
-
- lib/mail/fields/
|
166
|
-
- lib/mail/fields.rb
|
167
|
-
- lib/mail/
|
168
|
-
- lib/mail/
|
169
|
-
- lib/mail/
|
170
|
-
- lib/mail/
|
171
|
-
- lib/mail/
|
172
|
-
- lib/mail/
|
173
|
-
- lib/mail/
|
174
|
-
- lib/mail/
|
175
|
-
- lib/mail/
|
176
|
-
- lib/mail/
|
177
|
-
- lib/mail/
|
178
|
-
- lib/mail/network/
|
179
|
-
- lib/mail/network.rb
|
180
|
-
- lib/mail/
|
181
|
-
- lib/mail/
|
182
|
-
- lib/mail/
|
183
|
-
- lib/mail/
|
184
|
-
- lib/mail/
|
185
|
-
- lib/mail/
|
186
|
-
- lib/mail/
|
187
|
-
- lib/mail/parsers/
|
188
|
-
- lib/mail/parsers/
|
189
|
-
- lib/mail/parsers/
|
190
|
-
- lib/mail/parsers/
|
191
|
-
- lib/mail/parsers/
|
192
|
-
- lib/mail/parsers/
|
193
|
-
- lib/mail/parsers/
|
194
|
-
- lib/mail/parsers/
|
195
|
-
- lib/mail/parsers/
|
196
|
-
- lib/mail/parsers/
|
197
|
-
- lib/mail/parsers/
|
198
|
-
- lib/mail/parsers/
|
199
|
-
- lib/mail/parsers/
|
200
|
-
- lib/mail/parsers/
|
201
|
-
- lib/mail/parsers/
|
202
|
-
- lib/mail/parsers/
|
203
|
-
- lib/mail/parsers/
|
204
|
-
- lib/mail/parsers/
|
205
|
-
- lib/mail/parsers/
|
206
|
-
- lib/mail/parsers/
|
207
|
-
- lib/mail/parsers/
|
208
|
-
- lib/mail/
|
209
|
-
- lib/mail/
|
210
|
-
- lib/mail/
|
211
|
-
- lib/mail/
|
212
|
-
- lib/mail/
|
213
|
-
- lib/mail/
|
214
|
-
- lib/mail/
|
215
|
-
- lib/mail.rb
|
216
|
-
- lib/
|
217
|
-
- lib/tasks/
|
218
|
-
- lib/
|
219
|
-
- CHANGELOG.rdoc
|
220
|
-
has_rdoc: true
|
70
|
+
- README.rdoc
|
71
|
+
- Rakefile
|
72
|
+
- TODO.rdoc
|
73
|
+
- lib/mail.rb
|
74
|
+
- lib/VERSION
|
75
|
+
- lib/mail/attachments_list.rb
|
76
|
+
- lib/mail/body.rb
|
77
|
+
- lib/mail/configuration.rb
|
78
|
+
- lib/mail/elements.rb
|
79
|
+
- lib/mail/encodings.rb
|
80
|
+
- lib/mail/envelope.rb
|
81
|
+
- lib/mail/field.rb
|
82
|
+
- lib/mail/field_list.rb
|
83
|
+
- lib/mail/fields.rb
|
84
|
+
- lib/mail/header.rb
|
85
|
+
- lib/mail/mail.rb
|
86
|
+
- lib/mail/message.rb
|
87
|
+
- lib/mail/network.rb
|
88
|
+
- lib/mail/part.rb
|
89
|
+
- lib/mail/parts_list.rb
|
90
|
+
- lib/mail/patterns.rb
|
91
|
+
- lib/mail/utilities.rb
|
92
|
+
- lib/mail/version.rb
|
93
|
+
- lib/mail/core_extensions/nil.rb
|
94
|
+
- lib/mail/core_extensions/shellwords.rb
|
95
|
+
- lib/mail/core_extensions/smtp.rb
|
96
|
+
- lib/mail/core_extensions/string.rb
|
97
|
+
- lib/mail/elements/address.rb
|
98
|
+
- lib/mail/elements/address_list.rb
|
99
|
+
- lib/mail/elements/content_disposition_element.rb
|
100
|
+
- lib/mail/elements/content_location_element.rb
|
101
|
+
- lib/mail/elements/content_transfer_encoding_element.rb
|
102
|
+
- lib/mail/elements/content_type_element.rb
|
103
|
+
- lib/mail/elements/date_time_element.rb
|
104
|
+
- lib/mail/elements/envelope_from_element.rb
|
105
|
+
- lib/mail/elements/message_ids_element.rb
|
106
|
+
- lib/mail/elements/mime_version_element.rb
|
107
|
+
- lib/mail/elements/phrase_list.rb
|
108
|
+
- lib/mail/elements/received_element.rb
|
109
|
+
- lib/mail/encodings/7bit.rb
|
110
|
+
- lib/mail/encodings/8bit.rb
|
111
|
+
- lib/mail/encodings/base64.rb
|
112
|
+
- lib/mail/encodings/binary.rb
|
113
|
+
- lib/mail/encodings/quoted_printable.rb
|
114
|
+
- lib/mail/encodings/transfer_encoding.rb
|
115
|
+
- lib/mail/fields/bcc_field.rb
|
116
|
+
- lib/mail/fields/cc_field.rb
|
117
|
+
- lib/mail/fields/comments_field.rb
|
118
|
+
- lib/mail/fields/content_description_field.rb
|
119
|
+
- lib/mail/fields/content_disposition_field.rb
|
120
|
+
- lib/mail/fields/content_id_field.rb
|
121
|
+
- lib/mail/fields/content_location_field.rb
|
122
|
+
- lib/mail/fields/content_transfer_encoding_field.rb
|
123
|
+
- lib/mail/fields/content_type_field.rb
|
124
|
+
- lib/mail/fields/date_field.rb
|
125
|
+
- lib/mail/fields/from_field.rb
|
126
|
+
- lib/mail/fields/in_reply_to_field.rb
|
127
|
+
- lib/mail/fields/keywords_field.rb
|
128
|
+
- lib/mail/fields/message_id_field.rb
|
129
|
+
- lib/mail/fields/mime_version_field.rb
|
130
|
+
- lib/mail/fields/optional_field.rb
|
131
|
+
- lib/mail/fields/received_field.rb
|
132
|
+
- lib/mail/fields/references_field.rb
|
133
|
+
- lib/mail/fields/reply_to_field.rb
|
134
|
+
- lib/mail/fields/resent_bcc_field.rb
|
135
|
+
- lib/mail/fields/resent_cc_field.rb
|
136
|
+
- lib/mail/fields/resent_date_field.rb
|
137
|
+
- lib/mail/fields/resent_from_field.rb
|
138
|
+
- lib/mail/fields/resent_message_id_field.rb
|
139
|
+
- lib/mail/fields/resent_sender_field.rb
|
140
|
+
- lib/mail/fields/resent_to_field.rb
|
141
|
+
- lib/mail/fields/return_path_field.rb
|
142
|
+
- lib/mail/fields/sender_field.rb
|
143
|
+
- lib/mail/fields/structured_field.rb
|
144
|
+
- lib/mail/fields/subject_field.rb
|
145
|
+
- lib/mail/fields/to_field.rb
|
146
|
+
- lib/mail/fields/unstructured_field.rb
|
147
|
+
- lib/mail/fields/common/address_container.rb
|
148
|
+
- lib/mail/fields/common/common_address.rb
|
149
|
+
- lib/mail/fields/common/common_date.rb
|
150
|
+
- lib/mail/fields/common/common_field.rb
|
151
|
+
- lib/mail/fields/common/common_message_id.rb
|
152
|
+
- lib/mail/fields/common/parameter_hash.rb
|
153
|
+
- lib/mail/network/delivery_methods/file_delivery.rb
|
154
|
+
- lib/mail/network/delivery_methods/sendmail.rb
|
155
|
+
- lib/mail/network/delivery_methods/smtp.rb
|
156
|
+
- lib/mail/network/delivery_methods/smtp_connection.rb
|
157
|
+
- lib/mail/network/delivery_methods/test_mailer.rb
|
158
|
+
- lib/mail/network/retriever_methods/base.rb
|
159
|
+
- lib/mail/network/retriever_methods/imap.rb
|
160
|
+
- lib/mail/network/retriever_methods/pop3.rb
|
161
|
+
- lib/mail/network/retriever_methods/test_retriever.rb
|
162
|
+
- lib/mail/parsers/address_lists.rb
|
163
|
+
- lib/mail/parsers/address_lists.treetop
|
164
|
+
- lib/mail/parsers/content_disposition.rb
|
165
|
+
- lib/mail/parsers/content_disposition.treetop
|
166
|
+
- lib/mail/parsers/content_location.rb
|
167
|
+
- lib/mail/parsers/content_location.treetop
|
168
|
+
- lib/mail/parsers/content_transfer_encoding.rb
|
169
|
+
- lib/mail/parsers/content_transfer_encoding.treetop
|
170
|
+
- lib/mail/parsers/content_type.rb
|
171
|
+
- lib/mail/parsers/content_type.treetop
|
172
|
+
- lib/mail/parsers/date_time.rb
|
173
|
+
- lib/mail/parsers/date_time.treetop
|
174
|
+
- lib/mail/parsers/envelope_from.rb
|
175
|
+
- lib/mail/parsers/envelope_from.treetop
|
176
|
+
- lib/mail/parsers/message_ids.rb
|
177
|
+
- lib/mail/parsers/message_ids.treetop
|
178
|
+
- lib/mail/parsers/mime_version.rb
|
179
|
+
- lib/mail/parsers/mime_version.treetop
|
180
|
+
- lib/mail/parsers/phrase_lists.rb
|
181
|
+
- lib/mail/parsers/phrase_lists.treetop
|
182
|
+
- lib/mail/parsers/received.rb
|
183
|
+
- lib/mail/parsers/received.treetop
|
184
|
+
- lib/mail/parsers/rfc2045.rb
|
185
|
+
- lib/mail/parsers/rfc2045.treetop
|
186
|
+
- lib/mail/parsers/rfc2822.rb
|
187
|
+
- lib/mail/parsers/rfc2822.treetop
|
188
|
+
- lib/mail/parsers/rfc2822_obsolete.rb
|
189
|
+
- lib/mail/parsers/rfc2822_obsolete.treetop
|
190
|
+
- lib/mail/version_specific/ruby_1_8.rb
|
191
|
+
- lib/mail/version_specific/ruby_1_9.rb
|
192
|
+
- lib/tasks/corpus.rake
|
193
|
+
- lib/tasks/treetop.rake
|
194
|
+
- CHANGELOG.rdoc
|
221
195
|
homepage: http://github.com/mikel/mail
|
222
196
|
licenses: []
|
223
197
|
|
@@ -225,29 +199,23 @@ post_install_message:
|
|
225
199
|
rdoc_options: []
|
226
200
|
|
227
201
|
require_paths:
|
228
|
-
- lib
|
202
|
+
- lib
|
229
203
|
required_ruby_version: !ruby/object:Gem::Requirement
|
230
204
|
none: false
|
231
205
|
requirements:
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
segments:
|
236
|
-
- 0
|
237
|
-
version: "0"
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: "0"
|
238
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
210
|
none: false
|
240
211
|
requirements:
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
segments:
|
245
|
-
- 0
|
246
|
-
version: "0"
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: "0"
|
247
215
|
requirements: []
|
248
216
|
|
249
217
|
rubyforge_project:
|
250
|
-
rubygems_version: 1.
|
218
|
+
rubygems_version: 1.8.24
|
251
219
|
signing_key:
|
252
220
|
specification_version: 3
|
253
221
|
summary: Mail provides a nice Ruby DSL for making, sending and reading emails.
|