mail_male_mail 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,11 +25,17 @@ module MailMaleMail
25
25
  self.settings = options
26
26
  end
27
27
  def deliver!(mail)
28
- message = {}
29
- message[:to] = mail.to.join(", ")
28
+ message = [:to, :cc, :bcc].reduce({}) do |a, e|
29
+ val = mail.public_send(e)
30
+ a[e] = val.join(",") if val.present?
31
+
32
+ a
33
+ end
34
+
30
35
  message[:subject] = mail.subject.to_s
31
36
  message[:from] = mail.from.first.to_s
32
37
  message[:extra_provider_data] = ActiveSupport::JSON.decode(mail.header['X-PostalService-Data'].to_s) if mail.header['X-PostalService-Data']
38
+
33
39
  if mail.header['X-PostalService-Provider']
34
40
  message[:provider] = mail.header['X-PostalService-Provider'].to_s
35
41
  elsif self.settings[:provider]
@@ -1,3 +1,3 @@
1
1
  module MailMaleMail
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_male_mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-31 00:00:00.000000000 Z
12
+ date: 2013-06-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionmailer