ynw-ar_mailer 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
- * it only supports text/plain messages
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
- email = email_class.create!(:from => email.from, :to => to, :mail => new.to_s, :ready => true)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ynw-ar_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel