mail-ses 1.0.2 → 1.0.3

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: fddb2a3546aea105c83d8821c73028dcd48916aef5975b78705eeb0de42ea4be
4
- data.tar.gz: 0a6b2112dfc47c42e79c904f15a2afd0f084d8fd30e8e98a1705199b836ed848
3
+ metadata.gz: f36fa8ab1100cbb6f4fe9702bb821a133a476a3819fd638f9ef92c1abeb99b8b
4
+ data.tar.gz: 3e2c95acbc148a29c1a7cb21342d0e4de459ef3ac83e1bfdf8aceb73ad1e1c30
5
5
  SHA512:
6
- metadata.gz: f0efeb27830cdecb58aa115f9c5ff81e3ee1c9cbdda2bbf1ed7e274ed15cee139e3339e43d5d49056553fa0aa9c412f024000757b751ab6a6f9f1cc2f4c6347c
7
- data.tar.gz: 0d1d76a3b7d37cf440438013271a7f177098c120dc019a51fc8c976ff8662d73739860913e842fe665a483c8cb1c5b59f402527237d1bb29a32f2cc0bde31d4d
6
+ metadata.gz: d8da07c2fd176ec7d44b5944ae1defd6f5406cb83ced2877ab4a7bf8caefe6b91b12a09f4fff084e5efb4c4866f17e2728d0d0a17c21ede5909fedbc1367e963
7
+ data.tar.gz: 2d488a916475fc9bfc4d1d206c3f7316e8873d213d3f249267a41abc4549d1d61bbb4fb2bf7bdbef89fde299d8f79022982a33c72fcf25525eb7cbc98289efda
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.3
4
+
5
+ - Support UTF-8 chars in from, to, etc addresses.
6
+
3
7
  ### 1.0.2
4
8
 
5
9
  - Fix labels in being stripped from email addresses.
@@ -4,6 +4,14 @@ module Mail
4
4
  class SES
5
5
  # Builds options for Aws::SESV2::Client#send_email
6
6
  class OptionsBuilder
7
+ SES_FIELDS = %i[ from_email_address
8
+ from_email_address_identity_arn
9
+ reply_to_addresses
10
+ feedback_forwarding_email_address
11
+ feedback_forwarding_email_address_identity_arn
12
+ email_tags
13
+ configuration_set_name ].freeze
14
+
7
15
  # message - The Mail::Message object to be sent.
8
16
  # options - The Hash options which override any defaults
9
17
  # from the message.
@@ -20,7 +28,8 @@ module Mail
20
28
  private
21
29
 
22
30
  def ses_options
23
- slice_hash(@options, *RAW_EMAIL_ATTRS)
31
+ # TODO: address fields should be encoded to UTF-8
32
+ slice_hash(@options, *SES_FIELDS)
24
33
  end
25
34
 
26
35
  def message_options
@@ -41,7 +50,11 @@ module Mail
41
50
  end
42
51
 
43
52
  def extract_value(key)
44
- @message.header[key]&.formatted
53
+ @message.header[key]&.formatted&.map { |v| encode(v) }
54
+ end
55
+
56
+ def encode(value)
57
+ Mail::Encodings.address_encode(value)
45
58
  end
46
59
  end
47
60
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Mail
4
4
  class SES
5
- VERSION = '1.0.2'
5
+ VERSION = '1.0.3'
6
6
  end
7
7
  end
data/lib/mail/ses.rb CHANGED
@@ -7,14 +7,6 @@ require 'mail/ses/options_builder'
7
7
  module Mail
8
8
  # Mail delivery method handler for AWS SES
9
9
  class SES
10
- RAW_EMAIL_ATTRS = %i[ from_email_address
11
- from_email_address_identity_arn
12
- reply_to_addresses
13
- feedback_forwarding_email_address
14
- feedback_forwarding_email_address_identity_arn
15
- email_tags
16
- configuration_set_name ].freeze
17
-
18
10
  attr_accessor :settings
19
11
  attr_reader :client
20
12
 
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.2
4
+ version: 1.0.3
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-29 00:00:00.000000000 Z
11
+ date: 2022-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sesv2