mail 2.2.9 → 2.2.9.1
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 +8 -0
- data/README.rdoc +1 -0
- data/lib/VERSION +1 -1
- data/lib/mail/network/delivery_methods/smtp.rb +12 -0
- data/lib/mail/network/retriever_methods/imap.rb +21 -2
- metadata +5 -4
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== Mon Nov 15 13:04:41 UTC 2010 Mikel Lindsaar <mikel@rubyx.com>
|
2
|
+
|
3
|
+
* Add find_and_delete convenience method for consistency with POP3, document delete_after_find option (Donald Ball)
|
4
|
+
* Documenting the openssl_verify_mode setting (Donald Ball)
|
5
|
+
* Added ruby-1.8.6 back into the list of tested platforms (Donald Ball)
|
6
|
+
* Relax i18n dependency until we remove active support requirement
|
7
|
+
* Version Bump to 2.2.9.1 to include new i18n dependency
|
8
|
+
|
1
9
|
== Tue Oct 26 07:14:36 UTC 2010 Mikel Lindsaar <mikel@rubyx.com>
|
2
10
|
|
3
11
|
* Version Bump to 2.2.9 and tag
|
data/README.rdoc
CHANGED
@@ -29,6 +29,7 @@ Mail is tested and works on the following platforms:
|
|
29
29
|
|
30
30
|
* jruby-1.4.0 [ [x86_64-java] ]
|
31
31
|
* ree-1.8.7-2010.01 [ x86_64 ]
|
32
|
+
* ruby-1.8.6-p399 [ x86_64 ]
|
32
33
|
* ruby-1.8.7-p249 [ x86_64 ]
|
33
34
|
* ruby-1.9.1-head [ x86_64 ] (10 April 2010)
|
34
35
|
* ruby-1.9.2-head [ x86_64 ] (10 April 2010)
|
data/lib/VERSION
CHANGED
@@ -34,6 +34,18 @@ module Mail
|
|
34
34
|
# :enable_starttls_auto => true }
|
35
35
|
# end
|
36
36
|
#
|
37
|
+
# === Certificate verification
|
38
|
+
#
|
39
|
+
# When using TLS, some mail servers provide certificates that are self-signed
|
40
|
+
# or whose names do not exactly match the hostname given in the address.
|
41
|
+
# OpenSSL will reject these by default. The best remedy is to use the correct
|
42
|
+
# hostname or update the certificate authorities trusted by your ruby. If
|
43
|
+
# that isn't possible, you can control this behavior with
|
44
|
+
# an :openssl_verify_mode setting. Its value may be either an OpenSSL
|
45
|
+
# verify mode constant (OpenSSL::SSL::VERIFY_NONE), or a string containing
|
46
|
+
# the name of an OpenSSL verify mode (none, peer, client_once,
|
47
|
+
# fail_if_no_peer_cert).
|
48
|
+
#
|
37
49
|
# === Others
|
38
50
|
#
|
39
51
|
# Feel free to send me other examples that were tricky
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
module Mail
|
4
|
-
# The IMAP retriever allows to get the last, first or all emails from a
|
4
|
+
# The IMAP retriever allows to get the last, first or all emails from a IMAP server.
|
5
5
|
# Each email retrieved (RFC2822) is given as an instance of +Message+.
|
6
6
|
#
|
7
7
|
# While being retrieved, emails can be yielded if a block is given.
|
@@ -94,7 +94,7 @@ module Mail
|
|
94
94
|
find(options, &block)
|
95
95
|
end
|
96
96
|
|
97
|
-
# Find emails in a
|
97
|
+
# Find emails in a IMAP mailbox. Without any options, the 10 last received emails are returned.
|
98
98
|
#
|
99
99
|
# Possible options:
|
100
100
|
# mailbox: mailbox to search the email(s) in. The default is 'INBOX'.
|
@@ -102,6 +102,8 @@ module Mail
|
|
102
102
|
# order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
|
103
103
|
# count: number of emails to retrieve. The default value is 10. A value of 1 returns an
|
104
104
|
# instance of Message, not an array of Message instances.
|
105
|
+
# delete_after_find: flag for whether to delete each retreived email after find. Default
|
106
|
+
# is false. Use #find_and_delete if you would like this to default to true.
|
105
107
|
#
|
106
108
|
def find(options={}, &block)
|
107
109
|
options = validate_options(options)
|
@@ -137,6 +139,23 @@ module Mail
|
|
137
139
|
end
|
138
140
|
end
|
139
141
|
|
142
|
+
# Find emails in a IMAP mailbox, and then deletes them. Without any options, the
|
143
|
+
# five last received emails are returned.
|
144
|
+
#
|
145
|
+
# Possible options:
|
146
|
+
# what: last or first emails. The default is :first.
|
147
|
+
# order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
|
148
|
+
# count: number of emails to retrieve. The default value is 10. A value of 1 returns an
|
149
|
+
# instance of Message, not an array of Message instances.
|
150
|
+
# delete_after_find: flag for whether to delete each retreived email after find. Default
|
151
|
+
# is true. Use #find_and_delete if you would like this to default to false.
|
152
|
+
#
|
153
|
+
def find_and_delete(options = {}, &block)
|
154
|
+
options ||= {}
|
155
|
+
options[:delete_after_find] ||= true
|
156
|
+
find(options, &block)
|
157
|
+
end
|
158
|
+
|
140
159
|
# Delete all emails from a IMAP mailbox
|
141
160
|
def delete_all(mailbox='INBOX')
|
142
161
|
mailbox ||= 'INBOX'
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 89
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
9
|
- 9
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 2.2.9.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Mikel Lindsaar
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-
|
19
|
+
date: 2010-11-16 00:00:00 +11:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -71,7 +72,7 @@ dependencies:
|
|
71
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
72
73
|
none: false
|
73
74
|
requirements:
|
74
|
-
- -
|
75
|
+
- - ">="
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
hash: 13
|
77
78
|
segments:
|