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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/mail/ses/options_builder.rb +15 -2
- data/lib/mail/ses/version.rb +1 -1
- data/lib/mail/ses.rb +0 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f36fa8ab1100cbb6f4fe9702bb821a133a476a3819fd638f9ef92c1abeb99b8b
|
4
|
+
data.tar.gz: 3e2c95acbc148a29c1a7cb21342d0e4de459ef3ac83e1bfdf8aceb73ad1e1c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8da07c2fd176ec7d44b5944ae1defd6f5406cb83ced2877ab4a7bf8caefe6b91b12a09f4fff084e5efb4c4866f17e2728d0d0a17c21ede5909fedbc1367e963
|
7
|
+
data.tar.gz: 2d488a916475fc9bfc4d1d206c3f7316e8873d213d3f249267a41abc4549d1d61bbb4fb2bf7bdbef89fde299d8f79022982a33c72fcf25525eb7cbc98289efda
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
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
|
data/lib/mail/ses/version.rb
CHANGED
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.
|
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-
|
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
|