actionmailer 7.0.2.2 → 7.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 +15 -0
- data/lib/action_mailer/base.rb +33 -9
- data/lib/action_mailer/gem_version.rb +3 -3
- data/lib/action_mailer/message_delivery.rb +2 -2
- data/lib/action_mailer/railtie.rb +9 -4
- data/lib/action_mailer/rescuable.rb +1 -1
- data/lib/action_mailer/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 606a202b5233ac024500fda4724b2ee15c44e7916a3c762c223d331c9e913dd1
|
4
|
+
data.tar.gz: 177877e43234919d5d8718a3b110ff12483a977c3864b40f703ddfa53c20be9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c602239cbd2cdb420adccf493e1713be2759f2e492e536ca39ee7b8a86beea995df128b97f56c3107756dac4a1416fea086a2f600dc95722891ad806a7f330b
|
7
|
+
data.tar.gz: 8321114bdae2bb871c2e521fdc08885e235b39baa6f0654be1ba1e9ee5443224694a40817b6f8ce68104b42b3f378320e432f6c711e6d3aadd886910c6624234
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## Rails 7.0.3 (May 09, 2022) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 7.0.2.4 (April 26, 2022) ##
|
7
|
+
|
8
|
+
* No changes.
|
9
|
+
|
10
|
+
|
11
|
+
## Rails 7.0.2.3 (March 08, 2022) ##
|
12
|
+
|
13
|
+
* No changes.
|
14
|
+
|
15
|
+
|
1
16
|
## Rails 7.0.2.2 (February 11, 2022) ##
|
2
17
|
|
3
18
|
* No changes.
|
data/lib/action_mailer/base.rb
CHANGED
@@ -106,7 +106,7 @@ module ActionMailer
|
|
106
106
|
# You got a new note!
|
107
107
|
# <%= truncate(@note.body, length: 25) %>
|
108
108
|
#
|
109
|
-
# If you need to access the subject, from or the recipients in the view, you can do that through message object:
|
109
|
+
# If you need to access the subject, from, or the recipients in the view, you can do that through message object:
|
110
110
|
#
|
111
111
|
# You got a new note from <%= message.from %>!
|
112
112
|
# <%= truncate(@note.body, length: 25) %>
|
@@ -149,9 +149,9 @@ module ActionMailer
|
|
149
149
|
# mail = NotifierMailer.welcome(User.first) # => an ActionMailer::MessageDelivery object
|
150
150
|
# mail.deliver_now # generates and sends the email now
|
151
151
|
#
|
152
|
-
# The
|
152
|
+
# The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call
|
153
153
|
# your method to generate the mail. If you want direct access to the delegator, or <tt>Mail::Message</tt>,
|
154
|
-
# you can call the <tt>message</tt> method on the
|
154
|
+
# you can call the <tt>message</tt> method on the ActionMailer::MessageDelivery object.
|
155
155
|
#
|
156
156
|
# NotifierMailer.welcome(User.first).message # => a Mail::Message object
|
157
157
|
#
|
@@ -334,14 +334,37 @@ module ActionMailer
|
|
334
334
|
# end
|
335
335
|
#
|
336
336
|
# Callbacks in Action Mailer are implemented using
|
337
|
-
#
|
337
|
+
# AbstractController::Callbacks, so you can define and configure
|
338
338
|
# callbacks in the same manner that you would use callbacks in classes that
|
339
|
-
# inherit from
|
339
|
+
# inherit from ActionController::Base.
|
340
340
|
#
|
341
341
|
# Note that unless you have a specific reason to do so, you should prefer
|
342
342
|
# using <tt>before_action</tt> rather than <tt>after_action</tt> in your
|
343
343
|
# Action Mailer classes so that headers are parsed properly.
|
344
344
|
#
|
345
|
+
# = Rescuing Errors
|
346
|
+
#
|
347
|
+
# +rescue+ blocks inside of a mailer method cannot rescue errors that occur
|
348
|
+
# outside of rendering -- for example, record deserialization errors in a
|
349
|
+
# background job, or errors from a third-party mail delivery service.
|
350
|
+
#
|
351
|
+
# To rescue errors that occur during any part of the mailing process, use
|
352
|
+
# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]:
|
353
|
+
#
|
354
|
+
# class NotifierMailer < ApplicationMailer
|
355
|
+
# rescue_from ActiveJob::DeserializationError do
|
356
|
+
# # ...
|
357
|
+
# end
|
358
|
+
#
|
359
|
+
# rescue_from "SomeThirdPartyService::ApiError" do
|
360
|
+
# # ...
|
361
|
+
# end
|
362
|
+
#
|
363
|
+
# def notify(recipient)
|
364
|
+
# mail(to: recipient, subject: "Notification")
|
365
|
+
# end
|
366
|
+
# end
|
367
|
+
#
|
345
368
|
# = Previewing emails
|
346
369
|
#
|
347
370
|
# You can preview your email templates visually by adding a mailer preview file to the
|
@@ -493,28 +516,28 @@ module ActionMailer
|
|
493
516
|
end
|
494
517
|
|
495
518
|
# Register an Observer which will be notified when mail is delivered.
|
496
|
-
# Either a class, string or symbol can be passed in as the Observer.
|
519
|
+
# Either a class, string, or symbol can be passed in as the Observer.
|
497
520
|
# If a string or symbol is passed in it will be camelized and constantized.
|
498
521
|
def register_observer(observer)
|
499
522
|
Mail.register_observer(observer_class_for(observer))
|
500
523
|
end
|
501
524
|
|
502
525
|
# Unregister a previously registered Observer.
|
503
|
-
# Either a class, string or symbol can be passed in as the Observer.
|
526
|
+
# Either a class, string, or symbol can be passed in as the Observer.
|
504
527
|
# If a string or symbol is passed in it will be camelized and constantized.
|
505
528
|
def unregister_observer(observer)
|
506
529
|
Mail.unregister_observer(observer_class_for(observer))
|
507
530
|
end
|
508
531
|
|
509
532
|
# Register an Interceptor which will be called before mail is sent.
|
510
|
-
# Either a class, string or symbol can be passed in as the Interceptor.
|
533
|
+
# Either a class, string, or symbol can be passed in as the Interceptor.
|
511
534
|
# If a string or symbol is passed in it will be camelized and constantized.
|
512
535
|
def register_interceptor(interceptor)
|
513
536
|
Mail.register_interceptor(observer_class_for(interceptor))
|
514
537
|
end
|
515
538
|
|
516
539
|
# Unregister a previously registered Interceptor.
|
517
|
-
# Either a class, string or symbol can be passed in as the Interceptor.
|
540
|
+
# Either a class, string, or symbol can be passed in as the Interceptor.
|
518
541
|
# If a string or symbol is passed in it will be camelized and constantized.
|
519
542
|
def unregister_interceptor(interceptor)
|
520
543
|
Mail.unregister_interceptor(observer_class_for(interceptor))
|
@@ -624,6 +647,7 @@ module ActionMailer
|
|
624
647
|
@_message = NullMail.new unless @_mail_was_called
|
625
648
|
end
|
626
649
|
end
|
650
|
+
ruby2_keywords(:process)
|
627
651
|
|
628
652
|
class NullMail # :nodoc:
|
629
653
|
def body; "" end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module ActionMailer
|
4
|
-
# Returns the version of
|
4
|
+
# Returns the currently loaded version of Action Mailer as a <tt>Gem::Version</tt>.
|
5
5
|
def self.gem_version
|
6
6
|
Gem::Version.new VERSION::STRING
|
7
7
|
end
|
@@ -9,8 +9,8 @@ module ActionMailer
|
|
9
9
|
module VERSION
|
10
10
|
MAJOR = 7
|
11
11
|
MINOR = 0
|
12
|
-
TINY =
|
13
|
-
PRE =
|
12
|
+
TINY = 3
|
13
|
+
PRE = nil
|
14
14
|
|
15
15
|
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
16
16
|
end
|
@@ -63,7 +63,7 @@ module ActionMailer
|
|
63
63
|
# * <tt>:priority</tt> - Enqueues the email with the specified priority
|
64
64
|
#
|
65
65
|
# By default, the email will be enqueued using <tt>ActionMailer::MailDeliveryJob</tt>. Each
|
66
|
-
#
|
66
|
+
# ActionMailer::Base class can specify the job to use by setting the class variable
|
67
67
|
# +delivery_job+.
|
68
68
|
#
|
69
69
|
# class AccountRegistrationMailer < ApplicationMailer
|
@@ -89,7 +89,7 @@ module ActionMailer
|
|
89
89
|
# * <tt>:priority</tt> - Enqueues the email with the specified priority
|
90
90
|
#
|
91
91
|
# By default, the email will be enqueued using <tt>ActionMailer::MailDeliveryJob</tt>. Each
|
92
|
-
#
|
92
|
+
# ActionMailer::Base class can specify the job to use by setting the class variable
|
93
93
|
# +delivery_job+.
|
94
94
|
#
|
95
95
|
# class AccountRegistrationMailer < ApplicationMailer
|
@@ -23,7 +23,6 @@ module ActionMailer
|
|
23
23
|
options.stylesheets_dir ||= paths["public/stylesheets"].first
|
24
24
|
options.show_previews = Rails.env.development? if options.show_previews.nil?
|
25
25
|
options.cache_store ||= Rails.cache
|
26
|
-
options.smtp_settings ||= {}
|
27
26
|
|
28
27
|
if options.show_previews
|
29
28
|
options.preview_path ||= defined?(Rails.root) ? "#{Rails.root}/test/mailers/previews" : nil
|
@@ -46,9 +45,15 @@ module ActionMailer
|
|
46
45
|
self.delivery_job = delivery_job.constantize
|
47
46
|
end
|
48
47
|
|
49
|
-
if
|
50
|
-
|
51
|
-
|
48
|
+
if options.smtp_settings
|
49
|
+
self.smtp_settings = options.smtp_settings
|
50
|
+
end
|
51
|
+
|
52
|
+
smtp_timeout = options.delete(:smtp_timeout)
|
53
|
+
|
54
|
+
if self.smtp_settings && smtp_timeout
|
55
|
+
self.smtp_settings[:open_timeout] ||= smtp_timeout
|
56
|
+
self.smtp_settings[:read_timeout] ||= smtp_timeout
|
52
57
|
end
|
53
58
|
|
54
59
|
options.each { |k, v| send("#{k}=", v) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.0.
|
19
|
+
version: 7.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 7.0.
|
26
|
+
version: 7.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actionpack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 7.0.
|
33
|
+
version: 7.0.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 7.0.
|
40
|
+
version: 7.0.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: actionview
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 7.0.
|
47
|
+
version: 7.0.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 7.0.
|
54
|
+
version: 7.0.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activejob
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 7.0.
|
61
|
+
version: 7.0.3
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 7.0.
|
68
|
+
version: 7.0.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mail
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,10 +178,10 @@ licenses:
|
|
178
178
|
- MIT
|
179
179
|
metadata:
|
180
180
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
181
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
182
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
181
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.3/actionmailer/CHANGELOG.md
|
182
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.3/
|
183
183
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
184
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
184
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.3/actionmailer
|
185
185
|
rubygems_mfa_required: 'true'
|
186
186
|
post_install_message:
|
187
187
|
rdoc_options: []
|
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
requirements:
|
201
201
|
- none
|
202
|
-
rubygems_version: 3.
|
202
|
+
rubygems_version: 3.3.7
|
203
203
|
signing_key:
|
204
204
|
specification_version: 4
|
205
205
|
summary: Email composition and delivery framework (part of Rails).
|