mail-ses 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85feb11fd75e0a0af6ccc3c6a2d9711a48e9444db1fb2bec25f407a7388da165
4
- data.tar.gz: d32dd2fe4aa147b3d1a08b1d65aa4cf92ce4001fd6318e23b9d05f0a7c97433a
3
+ metadata.gz: fddb2a3546aea105c83d8821c73028dcd48916aef5975b78705eeb0de42ea4be
4
+ data.tar.gz: 0a6b2112dfc47c42e79c904f15a2afd0f084d8fd30e8e98a1705199b836ed848
5
5
  SHA512:
6
- metadata.gz: 66f8925d0f8f0cc657b0fcb26868d1ee57010360747e5782f8126f28a5054004a6a20a5d3358608617eb900d5429adebbe16e0eaa9b98567f3ad048b806743c9
7
- data.tar.gz: 339a15c00b6664a1266a3ea7dbe390ad684a434785fcc4670cb1f0a8c5b9409d3a7cc26892cf4c5d88a639c32c64671b1c56d224ec7ef9cc66188c9326b30506
6
+ metadata.gz: f0efeb27830cdecb58aa115f9c5ff81e3ee1c9cbdda2bbf1ed7e274ed15cee139e3339e43d5d49056553fa0aa9c412f024000757b751ab6a6f9f1cc2f4c6347c
7
+ data.tar.gz: 0d1d76a3b7d37cf440438013271a7f177098c120dc019a51fc8c976ff8662d73739860913e842fe665a483c8cb1c5b59f402527237d1bb29a32f2cc0bde31d4d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.2
4
+
5
+ - Fix labels in being stripped from email addresses.
6
+ - Support Reply-To address.
7
+
3
8
  ### 1.0.1
4
9
 
5
10
  - Add compatibility with Mail gem 2.8.0.
@@ -25,11 +25,12 @@ module Mail
25
25
 
26
26
  def message_options
27
27
  {
28
- from_email_address: @message.from&.first,
28
+ from_email_address: extract_value(:from)&.first,
29
+ reply_to_addresses: extract_value(:reply_to),
29
30
  destination: {
30
- to_addresses: Array(@message.to).compact,
31
- cc_addresses: Array(@message.cc).compact,
32
- bcc_addresses: Array(@message.bcc).compact
31
+ to_addresses: extract_value(:to) || [],
32
+ cc_addresses: extract_value(:cc) || [],
33
+ bcc_addresses: extract_value(:bcc) || []
33
34
  },
34
35
  content: { raw: { data: @message.to_s } }
35
36
  }.compact
@@ -38,6 +39,10 @@ module Mail
38
39
  def slice_hash(hash, *keys)
39
40
  keys.each_with_object({}) { |k, h| h[k] = hash[k] if hash.key?(k) }
40
41
  end
42
+
43
+ def extract_value(key)
44
+ @message.header[key]&.formatted
45
+ end
41
46
  end
42
47
  end
43
48
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Mail
4
4
  class SES
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
  end
7
7
  end
data/lib/mail/ses.rb CHANGED
@@ -9,6 +9,7 @@ module Mail
9
9
  class SES
10
10
  RAW_EMAIL_ATTRS = %i[ from_email_address
11
11
  from_email_address_identity_arn
12
+ reply_to_addresses
12
13
  feedback_forwarding_email_address
13
14
  feedback_forwarding_email_address_identity_arn
14
15
  email_tags
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail-ses
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnny Shields
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-27 00:00:00.000000000 Z
11
+ date: 2022-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sesv2