mail-ses 1.0.2 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/mail/ses/options_builder.rb +24 -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: f01ada56fdcbda459f4d85745571339e0ab9d63a8f2d7dd1f008a35318546825
|
4
|
+
data.tar.gz: fd369c9a8fcccadb8e367db16a9d35f49ecdabec33a24fd6690d8976df24b658
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4e9425b4e22b396b97f172758bfeb1de71512cb5360c4e5372d24da512ca43a0adb787aea556aac8c497f83c10b6abdd457707a022e62897723a10e79ff74e8
|
7
|
+
data.tar.gz: 49818a9754ffe39a54e7de1e79f229d17d7db679c52223d84ab562cc74b6e7b28f7b257df29e668af4925b5ac7dd0e8afa8e7e4297a6c0a1bc4847537711aac0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 1.0.5
|
4
|
+
|
5
|
+
- Pass-thru invalid email addresses.
|
6
|
+
|
7
|
+
### 1.0.4
|
8
|
+
|
9
|
+
- Fix missing method error related to message headers.
|
10
|
+
|
11
|
+
### 1.0.3
|
12
|
+
|
13
|
+
- Support UTF-8 chars in from, to, etc addresses.
|
14
|
+
|
3
15
|
### 1.0.2
|
4
16
|
|
5
17
|
- 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
|
-
|
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,20 @@ module Mail
|
|
41
50
|
end
|
42
51
|
|
43
52
|
def extract_value(key)
|
44
|
-
@message.header[key]
|
53
|
+
value = @message.header[key]
|
54
|
+
return unless value
|
55
|
+
|
56
|
+
if value.respond_to?(:formatted)
|
57
|
+
value.formatted
|
58
|
+
elsif value.respond_to?(:unparsed_value)
|
59
|
+
Array(value.unparsed_value)
|
60
|
+
else
|
61
|
+
[]
|
62
|
+
end&.map { |v| encode(v) }
|
63
|
+
end
|
64
|
+
|
65
|
+
def encode(value)
|
66
|
+
Mail::Encodings.address_encode(value)
|
45
67
|
end
|
46
68
|
end
|
47
69
|
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.5
|
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-
|
11
|
+
date: 2022-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sesv2
|