ynw-ar_mailer 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/action_mailer/ar_sendmail.rb +3 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -29,7 +29,7 @@ Sometimes Prod can face some issue that make it error like hell. There's no need
|
|
29
29
|
|
30
30
|
* all messages to same addressee are combined into one digest email
|
31
31
|
|
32
|
-
*
|
32
|
+
* digesting only supports text/plain messages
|
33
33
|
|
34
34
|
* if the digest mail is too big it gets truncated, and full digest is dumped to a file on server; truncated digest will tell about it
|
35
35
|
|
@@ -525,6 +525,8 @@ class ActionMailer::ARSendmail
|
|
525
525
|
subjects << subject
|
526
526
|
mail = msg.header.select {|key, value| ['date', 'from', 'subject'].include?(key)}.
|
527
527
|
map {|key, value| '%s: %s' % [key.capitalize, value.to_s]}.join("\n")
|
528
|
+
#some providers don't write Date header, e.g. ExceptionNotifier. but it's really welcome in digest items
|
529
|
+
mail = "Date: #{email.created_on}\n#{mail}" unless msg.header['date']
|
528
530
|
mail += "\n\n" + msg.body
|
529
531
|
mails << mail
|
530
532
|
from = msg.header['from'].to_s
|
@@ -557,7 +559,7 @@ class ActionMailer::ARSendmail
|
|
557
559
|
body = "This digest has #{mails.size} messages for you:\n\n" + body
|
558
560
|
end
|
559
561
|
new.body = body
|
560
|
-
|
562
|
+
email_class.create!(:from => email.from, :to => to, :mail => new.to_s, :ready => true)
|
561
563
|
end
|
562
564
|
end
|
563
565
|
self.new(:smtp_settings => options[:smtp_settings]).deliver_emails
|