vmail 1.7.3 → 1.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vmail/imap_client.rb +6 -2
- data/lib/vmail/showing_headers.rb +7 -1
- data/lib/vmail/version.rb +1 -1
- metadata +1 -1
data/lib/vmail/imap_client.rb
CHANGED
@@ -212,11 +212,15 @@ module Vmail
|
|
212
212
|
log "- update: new uids: #{new_ids.inspect}"
|
213
213
|
if !new_ids.empty?
|
214
214
|
self.max_seqno = new_ids[-1]
|
215
|
-
|
215
|
+
message_ids = fetch_and_cache_headers(new_ids)
|
216
|
+
res = get_message_headers(message_ids.reverse)
|
216
217
|
res
|
217
218
|
else
|
218
|
-
|
219
|
+
nil
|
219
220
|
end
|
221
|
+
rescue
|
222
|
+
log $!
|
223
|
+
log $!.backtrace.join("\n")
|
220
224
|
end
|
221
225
|
|
222
226
|
# gets 100 messages prior to id
|
@@ -2,7 +2,13 @@ module Vmail
|
|
2
2
|
module ShowingHeaders
|
3
3
|
|
4
4
|
def get_message_headers(message_ids)
|
5
|
-
messages = message_ids.map {|message_id|
|
5
|
+
messages = message_ids.map {|message_id|
|
6
|
+
m = Message[message_id]
|
7
|
+
if m.nil?
|
8
|
+
raise "Message #{message_id} not found"
|
9
|
+
end
|
10
|
+
m
|
11
|
+
}
|
6
12
|
messages.map {|m| format_header_for_list(m)}.join("\n")
|
7
13
|
end
|
8
14
|
|
data/lib/vmail/version.rb
CHANGED