vmail 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vmail/imap_client.rb +7 -3
- data/lib/vmail/version.rb +1 -1
- metadata +2 -2
data/lib/vmail/imap_client.rb
CHANGED
@@ -10,6 +10,7 @@ require 'logger'
|
|
10
10
|
|
11
11
|
module Vmail
|
12
12
|
class ImapClient
|
13
|
+
DIVIDER_WIDTH = 46
|
13
14
|
|
14
15
|
MailboxAliases = { 'sent' => '[Gmail]/Sent Mail',
|
15
16
|
'all' => '[Gmail]/All Mail',
|
@@ -370,7 +371,7 @@ module Vmail
|
|
370
371
|
size = fetch_data.attr["RFC822.SIZE"]
|
371
372
|
@current_message = <<-EOF
|
372
373
|
#{@mailbox} seqno:#{envelope_data[:seqno]} uid:#{uid} #{number_to_human_size size} #{format_parts_info(formatter.list_parts)}
|
373
|
-
|
374
|
+
#{divider '-'}
|
374
375
|
#{format_headers(formatter.extract_headers)}
|
375
376
|
|
376
377
|
#{out}
|
@@ -520,8 +521,7 @@ EOF
|
|
520
521
|
log "append to file range #{index_range.inspect} to file: #{file}"
|
521
522
|
index_range.each do |idx|
|
522
523
|
message = show_message(idx)
|
523
|
-
|
524
|
-
File.open(file, 'a') {|f| f.puts(divider + message + "\n\n")}
|
524
|
+
File.open(file, 'a') {|f| f.puts(divider('=') + "\n" + message + "\n\n")}
|
525
525
|
subject = (message[/^subject:(.*)/,1] || '').strip
|
526
526
|
log "appended message '#{subject}'"
|
527
527
|
end
|
@@ -575,6 +575,10 @@ EOF
|
|
575
575
|
original_body + signature
|
576
576
|
end
|
577
577
|
|
578
|
+
def divider(str)
|
579
|
+
str * DIVIDER_WIDTH
|
580
|
+
end
|
581
|
+
|
578
582
|
def deliver(text)
|
579
583
|
# parse the text. The headers are yaml. The rest is text body.
|
580
584
|
require 'net/smtp'
|
data/lib/vmail/version.rb
CHANGED