aws-actionmailer-ses 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws/action_mailer/railtie.rb +13 -0
- data/lib/aws/action_mailer/ses/mailer.rb +8 -14
- data/lib/aws/action_mailer/ses_v2/mailer.rb +8 -14
- data/lib/aws-actionmailer-ses.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5155bf8bc7c5caf160e77e7768a0029fe7514e7d33d9ab14544072e64bb96cf
|
4
|
+
data.tar.gz: a281ec02f365a903eade4ef008fde838b5748100211b3e2fa37aac1909d9dcff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c865beacd6615da65f966d7e89cf145bf301d72babec69915c7a1e74c277048d2005c86634857156f71088a37898623c8349a90f5cddd77ce20c1a38735f9ae3
|
7
|
+
data.tar.gz: 2d4ebed009cc45470df4b4ab9c2258dbc8737ec00b885c34abc7b0f570165cb26f01b597c737e4cef5b206563442333f1bc02c2fac4725b78a8a7a23648e68ab
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
1.0.0 (2024-11-21)
|
2
|
+
------------------
|
3
|
+
|
4
|
+
* Feature - [Major Version] Register ActionMailers with a Railtie and allow for configuration using `config.action_mailer.ses_v2_settings` and `config.action_mailer.ses_settings`.
|
5
|
+
|
1
6
|
0.1.0 (2024-11-16)
|
2
7
|
------------------
|
3
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1.0.0
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module ActionMailer
|
5
|
+
# @api private
|
6
|
+
class Railtie < Rails::Railtie
|
7
|
+
ActiveSupport.on_load(:action_mailer) do
|
8
|
+
add_delivery_method :ses, SES::Mailer
|
9
|
+
add_delivery_method :ses_v2, SESV2::Mailer
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -7,22 +7,21 @@ module Aws
|
|
7
7
|
module SES
|
8
8
|
# Provides a delivery method for ActionMailer that uses Amazon Simple Email Service.
|
9
9
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# client_options = { region: 'us-west-2' }
|
13
|
-
# ActionMailer::Base.add_delivery_method :ses, Aws::ActionMailer::SESMailer, **client_options
|
14
|
-
#
|
15
|
-
# Client options are used to construct a new Aws::SES::Client instance.
|
10
|
+
# Delivery settings are used to construct a new Aws::SES::Client instance.
|
16
11
|
# Once you have a delivery method, you can configure your Rails environment to use it:
|
17
12
|
#
|
18
13
|
# config.action_mailer.delivery_method = :ses
|
14
|
+
# config.action_mailer.ses_settings = { region: 'us-west-2' }
|
19
15
|
#
|
20
16
|
# @see https://guides.rubyonrails.org/action_mailer_basics.html
|
21
17
|
class Mailer
|
22
|
-
|
18
|
+
attr_reader :settings
|
19
|
+
|
20
|
+
# @param [Hash] settings Passes along initialization options to
|
23
21
|
# [Aws::SES::Client.new](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SES/Client.html#initialize-instance_method).
|
24
|
-
def initialize(
|
25
|
-
@
|
22
|
+
def initialize(settings = {})
|
23
|
+
@settings = settings
|
24
|
+
@client = Aws::SES::Client.new(settings)
|
26
25
|
@client.config.user_agent_frameworks << 'aws-actionmailer-ses'
|
27
26
|
end
|
28
27
|
|
@@ -37,11 +36,6 @@ module Aws
|
|
37
36
|
message.header[:ses_message_id] = response.message_id
|
38
37
|
end
|
39
38
|
end
|
40
|
-
|
41
|
-
# @return [Hash]
|
42
|
-
def settings
|
43
|
-
{}
|
44
|
-
end
|
45
39
|
end
|
46
40
|
end
|
47
41
|
end
|
@@ -7,22 +7,21 @@ module Aws
|
|
7
7
|
module SESV2
|
8
8
|
# Provides a delivery method for ActionMailer that uses Amazon Simple Email Service V2.
|
9
9
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# client_options = { region: 'us-west-2' }
|
13
|
-
# ActionMailer::Base.add_delivery_method :ses_v2, Aws::ActionMailer::SESV2Mailer, **client_options
|
14
|
-
#
|
15
|
-
# Client options are used to construct a new Aws::SESV2::Client instance.
|
10
|
+
# Delivery settings are used to construct a new Aws::SESV2::Client instance.
|
16
11
|
# Once you have a delivery method, you can configure your Rails environment to use it:
|
17
12
|
#
|
18
13
|
# config.action_mailer.delivery_method = :ses_v2
|
14
|
+
# config.action_mailer.ses_v2_settings = { region: 'us-west-2' }
|
19
15
|
#
|
20
16
|
# @see https://guides.rubyonrails.org/action_mailer_basics.html
|
21
17
|
class Mailer
|
22
|
-
|
18
|
+
attr_reader :settings
|
19
|
+
|
20
|
+
# @param [Hash] settings Passes along initialization settings to
|
23
21
|
# [Aws::SESV2::Client.new](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SESV2/Client.html#initialize-instance_method).
|
24
|
-
def initialize(
|
25
|
-
@
|
22
|
+
def initialize(settings = {})
|
23
|
+
@settings = settings
|
24
|
+
@client = Aws::SESV2::Client.new(settings)
|
26
25
|
@client.config.user_agent_frameworks << 'aws-actionmailer-ses'
|
27
26
|
end
|
28
27
|
|
@@ -41,11 +40,6 @@ module Aws
|
|
41
40
|
end
|
42
41
|
end
|
43
42
|
|
44
|
-
# @return [Hash]
|
45
|
-
def settings
|
46
|
-
{}
|
47
|
-
end
|
48
|
-
|
49
43
|
private
|
50
44
|
|
51
45
|
# smtp_envelope_from will default to the From address *without* sender names.
|
data/lib/aws-actionmailer-ses.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-actionmailer-ses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-ses
|
@@ -75,6 +75,7 @@ files:
|
|
75
75
|
- LICENSE
|
76
76
|
- VERSION
|
77
77
|
- lib/aws-actionmailer-ses.rb
|
78
|
+
- lib/aws/action_mailer/railtie.rb
|
78
79
|
- lib/aws/action_mailer/ses/mailer.rb
|
79
80
|
- lib/aws/action_mailer/ses_v2/mailer.rb
|
80
81
|
homepage: https://github.com/aws/aws-actionmailer-ses-ruby
|