konstruo 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +22 -0
  4. data/.tool-versions +1 -0
  5. data/CHANGELOG.md +21 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +35 -0
  8. data/Rakefile +10 -0
  9. data/lib/konstruo/mapper.rb +120 -0
  10. data/lib/konstruo/version.rb +6 -0
  11. data/lib/konstruo.rb +18 -0
  12. data/sorbet/config +4 -0
  13. data/sorbet/rbi/annotations/.gitattributes +1 -0
  14. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  15. data/sorbet/rbi/annotations/actionpack.rbi +430 -0
  16. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  17. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +454 -0
  21. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  22. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  23. data/sorbet/rbi/annotations/railties.rbi +61 -0
  24. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  25. data/sorbet/rbi/dsl/.gitattributes +1 -0
  26. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  27. data/sorbet/rbi/gems/.gitattributes +1 -0
  28. data/sorbet/rbi/gems/actioncable@7.2.1.rbi +3096 -0
  29. data/sorbet/rbi/gems/actionmailbox@7.2.1.rbi +1832 -0
  30. data/sorbet/rbi/gems/actionmailer@7.2.1.rbi +2664 -0
  31. data/sorbet/rbi/gems/actionpack@7.2.1.rbi +20536 -0
  32. data/sorbet/rbi/gems/actiontext@7.2.1.rbi +1697 -0
  33. data/sorbet/rbi/gems/actionview@7.2.1.rbi +15752 -0
  34. data/sorbet/rbi/gems/activejob@7.2.1.rbi +2828 -0
  35. data/sorbet/rbi/gems/activemodel@7.2.1.rbi +6762 -0
  36. data/sorbet/rbi/gems/activerecord@7.2.1.rbi +41433 -0
  37. data/sorbet/rbi/gems/activestorage@7.2.1.rbi +3247 -0
  38. data/sorbet/rbi/gems/activesupport@7.2.1.rbi +21142 -0
  39. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  40. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  41. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +78 -0
  42. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  43. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +11645 -0
  44. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  45. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  46. data/sorbet/rbi/gems/dashbrains-rubocop-config@1.0.4.rbi +9 -0
  47. data/sorbet/rbi/gems/date@3.3.4.rbi +75 -0
  48. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  49. data/sorbet/rbi/gems/drb@2.2.1.rbi +1347 -0
  50. data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
  51. data/sorbet/rbi/gems/globalid@1.2.1.rbi +749 -0
  52. data/sorbet/rbi/gems/i18n@1.14.5.rbi +2359 -0
  53. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  54. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  55. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  56. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  57. data/sorbet/rbi/gems/loofah@2.22.0.rbi +1081 -0
  58. data/sorbet/rbi/gems/mail@2.8.1.rbi +8658 -0
  59. data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
  60. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
  61. data/sorbet/rbi/gems/minitest@5.25.1.rbi +1546 -0
  62. data/sorbet/rbi/gems/net-imap@0.4.16.rbi +10845 -0
  63. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
  64. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  65. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +1228 -0
  66. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  67. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +293 -0
  68. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  69. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  70. data/sorbet/rbi/gems/parser@3.3.5.0.rbi +5519 -0
  71. data/sorbet/rbi/gems/prism@1.0.0.rbi +35493 -0
  72. data/sorbet/rbi/gems/psych@5.1.2.rbi +1769 -0
  73. data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
  74. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +727 -0
  75. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +747 -0
  76. data/sorbet/rbi/gems/rack@3.1.7.rbi +4902 -0
  77. data/sorbet/rbi/gems/rackup@2.1.0.rbi +390 -0
  78. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +758 -0
  79. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +785 -0
  80. data/sorbet/rbi/gems/rails@7.2.1.rbi +9 -0
  81. data/sorbet/rbi/gems/railties@7.2.1.rbi +3824 -0
  82. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  83. data/sorbet/rbi/gems/rake@13.2.1.rbi +3046 -0
  84. data/sorbet/rbi/gems/rbi@0.2.0.rbi +4105 -0
  85. data/sorbet/rbi/gems/rdoc@6.7.0.rbi +12721 -0
  86. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  87. data/sorbet/rbi/gems/reline@0.5.10.rbi +9 -0
  88. data/sorbet/rbi/gems/rspec-core@3.13.1.rbi +11012 -0
  89. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
  90. data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
  91. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  92. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  93. data/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi +7446 -0
  94. data/sorbet/rbi/gems/rubocop-capybara@2.21.0.rbi +9 -0
  95. data/sorbet/rbi/gems/rubocop-factory_bot@2.26.1.rbi +9 -0
  96. data/sorbet/rbi/gems/rubocop-graphql@1.5.4.rbi +9 -0
  97. data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +9 -0
  98. data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +9 -0
  99. data/sorbet/rbi/gems/rubocop-rails@2.26.1.rbi +9 -0
  100. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  101. data/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi +9 -0
  102. data/sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi +9 -0
  103. data/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi +9 -0
  104. data/sorbet/rbi/gems/rubocop@1.66.1.rbi +58268 -0
  105. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  106. data/sorbet/rbi/gems/securerandom@0.3.1.rbi +396 -0
  107. data/sorbet/rbi/gems/spoom@1.4.2.rbi +4932 -0
  108. data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
  109. data/sorbet/rbi/gems/tapioca@0.16.2.rbi +3581 -0
  110. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  111. data/sorbet/rbi/gems/timeout@0.4.1.rbi +149 -0
  112. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  113. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  114. data/sorbet/rbi/gems/useragent@0.16.10.rbi +9 -0
  115. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2607 -0
  116. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +993 -0
  117. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +121 -0
  118. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  119. data/sorbet/rbi/gems/yard@0.9.37.rbi +18570 -0
  120. data/sorbet/rbi/gems/zeitwerk@2.6.18.rbi +1051 -0
  121. data/sorbet/rbi/todo.rbi +6 -0
  122. data/sorbet/tapioca/config.yml +13 -0
  123. data/sorbet/tapioca/require.rb +9 -0
  124. data/tasks/bundle_update.rake +14 -0
  125. data/tasks/sorbet.rake +26 -0
  126. metadata +216 -0
@@ -0,0 +1,2664 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `actionmailer` gem.
5
+ # Please instead update this file by running `bin/tapioca gem actionmailer`.
6
+
7
+
8
+ # :include: ../README.rdoc
9
+ #
10
+ # source://actionmailer//lib/action_mailer/gem_version.rb#3
11
+ module ActionMailer
12
+ extend ::ActiveSupport::Autoload
13
+
14
+ class << self
15
+ # source://actionmailer//lib/action_mailer/deprecator.rb#4
16
+ def deprecator; end
17
+
18
+ # source://actionmailer//lib/action_mailer.rb#61
19
+ def eager_load!; end
20
+
21
+ # Returns the currently loaded version of Action Mailer as a +Gem::Version+.
22
+ #
23
+ # source://actionmailer//lib/action_mailer/gem_version.rb#5
24
+ def gem_version; end
25
+
26
+ # Returns the currently loaded version of Action Mailer as a
27
+ # +Gem::Version+.
28
+ #
29
+ # source://actionmailer//lib/action_mailer/version.rb#8
30
+ def version; end
31
+ end
32
+ end
33
+
34
+ # = Action Mailer \Base
35
+ #
36
+ # Action Mailer allows you to send email from your application using a mailer model and views.
37
+ #
38
+ # == Mailer Models
39
+ #
40
+ # To use Action Mailer, you need to create a mailer model.
41
+ #
42
+ # $ bin/rails generate mailer Notifier
43
+ #
44
+ # The generated model inherits from <tt>ApplicationMailer</tt> which in turn
45
+ # inherits from +ActionMailer::Base+. A mailer model defines methods
46
+ # used to generate an email message. In these methods, you can set up variables to be used in
47
+ # the mailer views, options on the mail itself such as the <tt>:from</tt> address, and attachments.
48
+ #
49
+ # class ApplicationMailer < ActionMailer::Base
50
+ # default from: 'from@example.com'
51
+ # layout 'mailer'
52
+ # end
53
+ #
54
+ # class NotifierMailer < ApplicationMailer
55
+ # default from: 'no-reply@example.com',
56
+ # return_path: 'system@example.com'
57
+ #
58
+ # def welcome(recipient)
59
+ # @account = recipient
60
+ # mail(to: recipient.email_address_with_name,
61
+ # bcc: ["bcc@example.com", "Order Watcher <watcher@example.com>"])
62
+ # end
63
+ # end
64
+ #
65
+ # Within the mailer method, you have access to the following methods:
66
+ #
67
+ # * <tt>attachments[]=</tt> - Allows you to add attachments to your email in an intuitive
68
+ # manner; <tt>attachments['filename.png'] = File.read('path/to/filename.png')</tt>
69
+ #
70
+ # * <tt>attachments.inline[]=</tt> - Allows you to add an inline attachment to your email
71
+ # in the same manner as <tt>attachments[]=</tt>
72
+ #
73
+ # * <tt>headers[]=</tt> - Allows you to specify any header field in your email such
74
+ # as <tt>headers['X-No-Spam'] = 'True'</tt>. Note that declaring a header multiple times
75
+ # will add many fields of the same name. Read #headers doc for more information.
76
+ #
77
+ # * <tt>headers(hash)</tt> - Allows you to specify multiple headers in your email such
78
+ # as <tt>headers({'X-No-Spam' => 'True', 'In-Reply-To' => '1234@message.id'})</tt>
79
+ #
80
+ # * <tt>mail</tt> - Allows you to specify email to be sent.
81
+ #
82
+ # The hash passed to the mail method allows you to specify any header that a +Mail::Message+
83
+ # will accept (any valid email header including optional fields).
84
+ #
85
+ # The +mail+ method, if not passed a block, will inspect your views and send all the views with
86
+ # the same name as the method, so the above action would send the +welcome.text.erb+ view
87
+ # file as well as the +welcome.html.erb+ view file in a +multipart/alternative+ email.
88
+ #
89
+ # If you want to explicitly render only certain templates, pass a block:
90
+ #
91
+ # mail(to: user.email) do |format|
92
+ # format.text
93
+ # format.html
94
+ # end
95
+ #
96
+ # The block syntax is also useful in providing information specific to a part:
97
+ #
98
+ # mail(to: user.email) do |format|
99
+ # format.html
100
+ # end
101
+ #
102
+ # Or even to render a special view:
103
+ #
104
+ # mail(to: user.email) do |format|
105
+ # format.text
106
+ # format.html { render "some_other_template" }
107
+ # end
108
+ #
109
+ # == Mailer views
110
+ #
111
+ # Like Action Controller, each mailer class has a corresponding view directory in which each
112
+ # method of the class looks for a template with its name.
113
+ #
114
+ # To define a template to be used with a mailer, create an <tt>.erb</tt> file with the same
115
+ # name as the method in your mailer model. For example, in the mailer defined above, the template at
116
+ # <tt>app/views/notifier_mailer/welcome.text.erb</tt> would be used to generate the email.
117
+ #
118
+ # Variables defined in the methods of your mailer model are accessible as instance variables in their
119
+ # corresponding view.
120
+ #
121
+ # Emails by default are sent in plain text, so a sample view for our model example might look like this:
122
+ #
123
+ # Hi <%= @account.name %>,
124
+ # Thanks for joining our service! Please check back often.
125
+ #
126
+ # You can even use Action View helpers in these views. For example:
127
+ #
128
+ # You got a new note!
129
+ # <%= truncate(@note.body, length: 25) %>
130
+ #
131
+ # If you need to access the subject, from, or the recipients in the view, you can do that through message object:
132
+ #
133
+ # You got a new note from <%= message.from %>!
134
+ # <%= truncate(@note.body, length: 25) %>
135
+ #
136
+ #
137
+ # == Generating URLs
138
+ #
139
+ # URLs can be generated in mailer views using <tt>url_for</tt> or named routes. Unlike controllers from
140
+ # Action Pack, the mailer instance doesn't have any context about the incoming request, so you'll need
141
+ # to provide all of the details needed to generate a URL.
142
+ #
143
+ # When using <tt>url_for</tt> you'll need to provide the <tt>:host</tt>, <tt>:controller</tt>, and <tt>:action</tt>:
144
+ #
145
+ # <%= url_for(host: "example.com", controller: "welcome", action: "greeting") %>
146
+ #
147
+ # When using named routes you only need to supply the <tt>:host</tt>:
148
+ #
149
+ # <%= users_url(host: "example.com") %>
150
+ #
151
+ # You should use the <tt>named_route_url</tt> style (which generates absolute URLs) and avoid using the
152
+ # <tt>named_route_path</tt> style (which generates relative URLs), since clients reading the mail will
153
+ # have no concept of a current URL from which to determine a relative path.
154
+ #
155
+ # It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt>
156
+ # option as a configuration option in <tt>config/application.rb</tt>:
157
+ #
158
+ # config.action_mailer.default_url_options = { host: "example.com" }
159
+ #
160
+ # You can also define a <tt>default_url_options</tt> method on individual mailers to override these
161
+ # default settings per-mailer.
162
+ #
163
+ # By default when <tt>config.force_ssl</tt> is +true+, URLs generated for hosts will use the HTTPS protocol.
164
+ #
165
+ # == Sending mail
166
+ #
167
+ # Once a mailer action and template are defined, you can deliver your message or defer its creation and
168
+ # delivery for later:
169
+ #
170
+ # NotifierMailer.welcome(User.first).deliver_now # sends the email
171
+ # mail = NotifierMailer.welcome(User.first) # => an ActionMailer::MessageDelivery object
172
+ # mail.deliver_now # generates and sends the email now
173
+ #
174
+ # The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call
175
+ # your method to generate the mail. If you want direct access to the delegator, or +Mail::Message+,
176
+ # you can call the <tt>message</tt> method on the ActionMailer::MessageDelivery object.
177
+ #
178
+ # NotifierMailer.welcome(User.first).message # => a Mail::Message object
179
+ #
180
+ # Action Mailer is nicely integrated with Active Job so you can generate and send emails in the background
181
+ # (example: outside of the request-response cycle, so the user doesn't have to wait on it):
182
+ #
183
+ # NotifierMailer.welcome(User.first).deliver_later # enqueue the email sending to Active Job
184
+ #
185
+ # Note that <tt>deliver_later</tt> will execute your method from the background job.
186
+ #
187
+ # You never instantiate your mailer class. Rather, you just call the method you defined on the class itself.
188
+ # All instance methods are expected to return a message object to be sent.
189
+ #
190
+ # == Multipart Emails
191
+ #
192
+ # Multipart messages can also be used implicitly because Action Mailer will automatically detect and use
193
+ # multipart templates, where each template is named after the name of the action, followed by the content
194
+ # type. Each such detected template will be added to the message, as a separate part.
195
+ #
196
+ # For example, if the following templates exist:
197
+ # * signup_notification.text.erb
198
+ # * signup_notification.html.erb
199
+ # * signup_notification.xml.builder
200
+ # * signup_notification.yml.erb
201
+ #
202
+ # Each would be rendered and added as a separate part to the message, with the corresponding content
203
+ # type. The content type for the entire message is automatically set to <tt>multipart/alternative</tt>,
204
+ # which indicates that the email contains multiple different representations of the same email
205
+ # body. The same instance variables defined in the action are passed to all email templates.
206
+ #
207
+ # Implicit template rendering is not performed if any attachments or parts have been added to the email.
208
+ # This means that you'll have to manually add each part to the email and set the content type of the email
209
+ # to <tt>multipart/alternative</tt>.
210
+ #
211
+ # == Attachments
212
+ #
213
+ # Sending attachment in emails is easy:
214
+ #
215
+ # class NotifierMailer < ApplicationMailer
216
+ # def welcome(recipient)
217
+ # attachments['free_book.pdf'] = File.read('path/to/file.pdf')
218
+ # mail(to: recipient, subject: "New account information")
219
+ # end
220
+ # end
221
+ #
222
+ # Which will (if it had both a <tt>welcome.text.erb</tt> and <tt>welcome.html.erb</tt>
223
+ # template in the view directory), send a complete <tt>multipart/mixed</tt> email with two parts,
224
+ # the first part being a <tt>multipart/alternative</tt> with the text and HTML email parts inside,
225
+ # and the second being a <tt>application/pdf</tt> with a Base64 encoded copy of the file.pdf book
226
+ # with the filename +free_book.pdf+.
227
+ #
228
+ # If you need to send attachments with no content, you need to create an empty view for it,
229
+ # or add an empty body parameter like this:
230
+ #
231
+ # class NotifierMailer < ApplicationMailer
232
+ # def welcome(recipient)
233
+ # attachments['free_book.pdf'] = File.read('path/to/file.pdf')
234
+ # mail(to: recipient, subject: "New account information", body: "")
235
+ # end
236
+ # end
237
+ #
238
+ # You can also send attachments with HTML template, in this case you need to add body, attachments,
239
+ # and custom content type like this:
240
+ #
241
+ # class NotifierMailer < ApplicationMailer
242
+ # def welcome(recipient)
243
+ # attachments["free_book.pdf"] = File.read("path/to/file.pdf")
244
+ # mail(to: recipient,
245
+ # subject: "New account information",
246
+ # content_type: "text/html",
247
+ # body: "<html><body>Hello there</body></html>")
248
+ # end
249
+ # end
250
+ #
251
+ # == Inline Attachments
252
+ #
253
+ # You can also specify that a file should be displayed inline with other HTML. This is useful
254
+ # if you want to display a corporate logo or a photo.
255
+ #
256
+ # class NotifierMailer < ApplicationMailer
257
+ # def welcome(recipient)
258
+ # attachments.inline['photo.png'] = File.read('path/to/photo.png')
259
+ # mail(to: recipient, subject: "Here is what we look like")
260
+ # end
261
+ # end
262
+ #
263
+ # And then to reference the image in the view, you create a <tt>welcome.html.erb</tt> file and
264
+ # make a call to +image_tag+ passing in the attachment you want to display and then call
265
+ # +url+ on the attachment to get the relative content id path for the image source:
266
+ #
267
+ # <h1>Please Don't Cringe</h1>
268
+ #
269
+ # <%= image_tag attachments['photo.png'].url -%>
270
+ #
271
+ # As we are using Action View's +image_tag+ method, you can pass in any other options you want:
272
+ #
273
+ # <h1>Please Don't Cringe</h1>
274
+ #
275
+ # <%= image_tag attachments['photo.png'].url, alt: 'Our Photo', class: 'photo' -%>
276
+ #
277
+ # == Observing and Intercepting Mails
278
+ #
279
+ # Action Mailer provides hooks into the Mail observer and interceptor methods. These allow you to
280
+ # register classes that are called during the mail delivery life cycle.
281
+ #
282
+ # An observer class must implement the <tt>:delivered_email(message)</tt> method which will be
283
+ # called once for every email sent after the email has been sent.
284
+ #
285
+ # An interceptor class must implement the <tt>:delivering_email(message)</tt> method which will be
286
+ # called before the email is sent, allowing you to make modifications to the email before it hits
287
+ # the delivery agents. Your class should make any needed modifications directly to the passed
288
+ # in +Mail::Message+ instance.
289
+ #
290
+ # == Default \Hash
291
+ #
292
+ # Action Mailer provides some intelligent defaults for your emails, these are usually specified in a
293
+ # default method inside the class definition:
294
+ #
295
+ # class NotifierMailer < ApplicationMailer
296
+ # default sender: 'system@example.com'
297
+ # end
298
+ #
299
+ # You can pass in any header value that a +Mail::Message+ accepts. Out of the box,
300
+ # +ActionMailer::Base+ sets the following:
301
+ #
302
+ # * <tt>mime_version: "1.0"</tt>
303
+ # * <tt>charset: "UTF-8"</tt>
304
+ # * <tt>content_type: "text/plain"</tt>
305
+ # * <tt>parts_order: [ "text/plain", "text/enriched", "text/html" ]</tt>
306
+ #
307
+ # <tt>parts_order</tt> and <tt>charset</tt> are not actually valid +Mail::Message+ header fields,
308
+ # but Action Mailer translates them appropriately and sets the correct values.
309
+ #
310
+ # As you can pass in any header, you need to either quote the header as a string, or pass it in as
311
+ # an underscored symbol, so the following will work:
312
+ #
313
+ # class NotifierMailer < ApplicationMailer
314
+ # default 'Content-Transfer-Encoding' => '7bit',
315
+ # content_description: 'This is a description'
316
+ # end
317
+ #
318
+ # Finally, Action Mailer also supports passing <tt>Proc</tt> and <tt>Lambda</tt> objects into the default hash,
319
+ # so you can define methods that evaluate as the message is being generated:
320
+ #
321
+ # class NotifierMailer < ApplicationMailer
322
+ # default 'X-Special-Header' => Proc.new { my_method }, to: -> { @inviter.email_address }
323
+ #
324
+ # private
325
+ # def my_method
326
+ # 'some complex call'
327
+ # end
328
+ # end
329
+ #
330
+ # Note that the proc/lambda is evaluated right at the start of the mail message generation, so if you
331
+ # set something in the default hash using a proc, and then set the same thing inside of your
332
+ # mailer method, it will get overwritten by the mailer method.
333
+ #
334
+ # It is also possible to set these default options that will be used in all mailers through
335
+ # the <tt>default_options=</tt> configuration in <tt>config/application.rb</tt>:
336
+ #
337
+ # config.action_mailer.default_options = { from: "no-reply@example.org" }
338
+ #
339
+ # == \Callbacks
340
+ #
341
+ # You can specify callbacks using <tt>before_action</tt> and <tt>after_action</tt> for configuring your messages,
342
+ # and using <tt>before_deliver</tt> and <tt>after_deliver</tt> for wrapping the delivery process.
343
+ # For example, when you want to add default inline attachments and log delivery for all messages
344
+ # sent out by a certain mailer class:
345
+ #
346
+ # class NotifierMailer < ApplicationMailer
347
+ # before_action :add_inline_attachment!
348
+ # after_deliver :log_delivery
349
+ #
350
+ # def welcome
351
+ # mail
352
+ # end
353
+ #
354
+ # private
355
+ # def add_inline_attachment!
356
+ # attachments.inline["footer.jpg"] = File.read('/path/to/filename.jpg')
357
+ # end
358
+ #
359
+ # def log_delivery
360
+ # Rails.logger.info "Sent email with message id '#{message.message_id}' at #{Time.current}."
361
+ # end
362
+ # end
363
+ #
364
+ # Action callbacks in Action Mailer are implemented using
365
+ # AbstractController::Callbacks, so you can define and configure
366
+ # callbacks in the same manner that you would use callbacks in classes that
367
+ # inherit from ActionController::Base.
368
+ #
369
+ # Note that unless you have a specific reason to do so, you should prefer
370
+ # using <tt>before_action</tt> rather than <tt>after_action</tt> in your
371
+ # Action Mailer classes so that headers are parsed properly.
372
+ #
373
+ # == Rescuing Errors
374
+ #
375
+ # +rescue+ blocks inside of a mailer method cannot rescue errors that occur
376
+ # outside of rendering -- for example, record deserialization errors in a
377
+ # background job, or errors from a third-party mail delivery service.
378
+ #
379
+ # To rescue errors that occur during any part of the mailing process, use
380
+ # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]:
381
+ #
382
+ # class NotifierMailer < ApplicationMailer
383
+ # rescue_from ActiveJob::DeserializationError do
384
+ # # ...
385
+ # end
386
+ #
387
+ # rescue_from "SomeThirdPartyService::ApiError" do
388
+ # # ...
389
+ # end
390
+ #
391
+ # def notify(recipient)
392
+ # mail(to: recipient, subject: "Notification")
393
+ # end
394
+ # end
395
+ #
396
+ # == Previewing emails
397
+ #
398
+ # You can preview your email templates visually by adding a mailer preview file to the
399
+ # <tt>ActionMailer::Base.preview_paths</tt>. Since most emails do something interesting
400
+ # with database data, you'll need to write some scenarios to load messages with fake data:
401
+ #
402
+ # class NotifierMailerPreview < ActionMailer::Preview
403
+ # def welcome
404
+ # NotifierMailer.welcome(User.first)
405
+ # end
406
+ # end
407
+ #
408
+ # Methods must return a +Mail::Message+ object which can be generated by calling the mailer
409
+ # method without the additional <tt>deliver_now</tt> / <tt>deliver_later</tt>. The location of the
410
+ # mailer preview directories can be configured using the <tt>preview_paths</tt> option which has a default
411
+ # of <tt>test/mailers/previews</tt>:
412
+ #
413
+ # config.action_mailer.preview_paths << "#{Rails.root}/lib/mailer_previews"
414
+ #
415
+ # An overview of all previews is accessible at <tt>http://localhost:3000/rails/mailers</tt>
416
+ # on a running development server instance.
417
+ #
418
+ # Previews can also be intercepted in a similar manner as deliveries can be by registering
419
+ # a preview interceptor that has a <tt>previewing_email</tt> method:
420
+ #
421
+ # class CssInlineStyler
422
+ # def self.previewing_email(message)
423
+ # # inline CSS styles
424
+ # end
425
+ # end
426
+ #
427
+ # config.action_mailer.preview_interceptors :css_inline_styler
428
+ #
429
+ # Note that interceptors need to be registered both with <tt>register_interceptor</tt>
430
+ # and <tt>register_preview_interceptor</tt> if they should operate on both sending and
431
+ # previewing emails.
432
+ #
433
+ # == Configuration options
434
+ #
435
+ # These options are specified on the class level, like
436
+ # <tt>ActionMailer::Base.raise_delivery_errors = true</tt>
437
+ #
438
+ # * <tt>default_options</tt> - You can pass this in at a class level as well as within the class itself as
439
+ # per the above section.
440
+ #
441
+ # * <tt>logger</tt> - the logger is used for generating information on the mailing run if available.
442
+ # Can be set to +nil+ for no logging. Compatible with both Ruby's own +Logger+ and Log4r loggers.
443
+ #
444
+ # * <tt>smtp_settings</tt> - Allows detailed configuration for <tt>:smtp</tt> delivery method:
445
+ # * <tt>:address</tt> - Allows you to use a remote mail server. Just change it from its default
446
+ # "localhost" setting.
447
+ # * <tt>:port</tt> - On the off chance that your mail server doesn't run on port 25, you can change it.
448
+ # * <tt>:domain</tt> - If you need to specify a HELO domain, you can do it here.
449
+ # * <tt>:user_name</tt> - If your mail server requires authentication, set the username in this setting.
450
+ # * <tt>:password</tt> - If your mail server requires authentication, set the password in this setting.
451
+ # * <tt>:authentication</tt> - If your mail server requires authentication, you need to specify the
452
+ # authentication type here.
453
+ # This is a symbol and one of <tt>:plain</tt> (will send the password Base64 encoded), <tt>:login</tt> (will
454
+ # send the password Base64 encoded) or <tt>:cram_md5</tt> (combines a Challenge/Response mechanism to exchange
455
+ # information and a cryptographic Message Digest 5 algorithm to hash important information)
456
+ # * <tt>:enable_starttls</tt> - Use STARTTLS when connecting to your SMTP server and fail if unsupported. Defaults
457
+ # to <tt>false</tt>. Requires at least version 2.7 of the Mail gem.
458
+ # * <tt>:enable_starttls_auto</tt> - Detects if STARTTLS is enabled in your SMTP server and starts
459
+ # to use it. Defaults to <tt>true</tt>.
460
+ # * <tt>:openssl_verify_mode</tt> - When using TLS, you can set how OpenSSL checks the certificate. This is
461
+ # really useful if you need to validate a self-signed and/or a wildcard certificate. You can use the name
462
+ # of an OpenSSL verify constant (<tt>'none'</tt> or <tt>'peer'</tt>) or directly the constant
463
+ # (+OpenSSL::SSL::VERIFY_NONE+ or +OpenSSL::SSL::VERIFY_PEER+).
464
+ # * <tt>:ssl/:tls</tt> Enables the SMTP connection to use SMTP/TLS (SMTPS: SMTP over direct TLS connection)
465
+ # * <tt>:open_timeout</tt> Number of seconds to wait while attempting to open a connection.
466
+ # * <tt>:read_timeout</tt> Number of seconds to wait until timing-out a read(2) call.
467
+ #
468
+ # * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method.
469
+ # * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
470
+ # * <tt>:arguments</tt> - The command line arguments. Defaults to <tt>%w[ -i ]</tt> with <tt>-f sender@address</tt>
471
+ # added automatically before the message is sent.
472
+ #
473
+ # * <tt>file_settings</tt> - Allows you to override options for the <tt>:file</tt> delivery method.
474
+ # * <tt>:location</tt> - The directory into which emails will be written. Defaults to the application
475
+ # <tt>tmp/mails</tt>.
476
+ #
477
+ # * <tt>raise_delivery_errors</tt> - Whether or not errors should be raised if the email fails to be delivered.
478
+ #
479
+ # * <tt>delivery_method</tt> - Defines a delivery method. Possible values are <tt>:smtp</tt> (default),
480
+ # <tt>:sendmail</tt>, <tt>:test</tt>, and <tt>:file</tt>. Or you may provide a custom delivery method
481
+ # object e.g. +MyOwnDeliveryMethodClass+. See the Mail gem documentation on the interface you need to
482
+ # implement for a custom delivery agent.
483
+ #
484
+ # * <tt>perform_deliveries</tt> - Determines whether emails are actually sent from Action Mailer when you
485
+ # call <tt>.deliver</tt> on an email message or on an Action Mailer method. This is on by default but can
486
+ # be turned off to aid in functional testing.
487
+ #
488
+ # * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with
489
+ # <tt>delivery_method :test</tt>. Most useful for unit and functional testing.
490
+ #
491
+ # * <tt>delivery_job</tt> - The job class used with <tt>deliver_later</tt>. Mailers can set this to use a
492
+ # custom delivery job. Defaults to +ActionMailer::MailDeliveryJob+.
493
+ #
494
+ # * <tt>deliver_later_queue_name</tt> - The queue name used by <tt>deliver_later</tt> with the default
495
+ # <tt>delivery_job</tt>. Mailers can set this to use a custom queue name.
496
+ #
497
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
498
+ #
499
+ # source://actionmailer//lib/action_mailer/base.rb#476
500
+ class ActionMailer::Base < ::AbstractController::Base
501
+ include ::ActionMailer::Callbacks
502
+ include ::ActiveSupport::Callbacks
503
+ include ::ActionMailer::DeliveryMethods
504
+ include ::ActionMailer::QueuedDelivery
505
+ include ::ActiveSupport::Rescuable
506
+ include ::ActionMailer::Rescuable
507
+ include ::ActionMailer::Parameterized
508
+ include ::ActionMailer::Previews
509
+ include ::ActionMailer::FormBuilder
510
+ include ::ActionView::ViewPaths
511
+ include ::AbstractController::Rendering
512
+ include ::AbstractController::Logger
513
+ include ::ActiveSupport::Benchmarkable
514
+ include ::AbstractController::Helpers
515
+ include ::AbstractController::Translation
516
+ include ::AbstractController::AssetPaths
517
+ include ::AbstractController::Callbacks
518
+ include ::AbstractController::Caching::Fragments
519
+ include ::AbstractController::Caching::ConfigMethods
520
+ include ::AbstractController::Caching
521
+ include ::ActionView::Rendering
522
+ include ::ActionView::Layouts
523
+ extend ::ActionMailer::Callbacks::ClassMethods
524
+ extend ::ActiveSupport::Callbacks::ClassMethods
525
+ extend ::ActionMailer::DeliveryMethods::ClassMethods
526
+ extend ::ActiveSupport::Rescuable::ClassMethods
527
+ extend ::ActionMailer::Rescuable::ClassMethods
528
+ extend ::ActionMailer::Parameterized::ClassMethods
529
+ extend ::ActionMailer::Previews::ClassMethods
530
+ extend ::ActionMailer::FormBuilder::ClassMethods
531
+ extend ::ActionView::ViewPaths::ClassMethods
532
+ extend ::AbstractController::Helpers::Resolution
533
+ extend ::AbstractController::Helpers::ClassMethods
534
+ extend ::AbstractController::Callbacks::ClassMethods
535
+ extend ::AbstractController::Caching::Fragments::ClassMethods
536
+ extend ::AbstractController::Caching::ClassMethods
537
+ extend ::AbstractController::Caching::ConfigMethods
538
+ extend ::ActionView::Rendering::ClassMethods
539
+ extend ::ActionView::Layouts::ClassMethods
540
+
541
+ # @return [Base] a new instance of Base
542
+ #
543
+ # source://actionmailer//lib/action_mailer/base.rb#643
544
+ def initialize; end
545
+
546
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
547
+ def __callbacks; end
548
+
549
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
550
+ def __callbacks?; end
551
+
552
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#924
553
+ def _deliver_callbacks; end
554
+
555
+ # source://actionpack/7.2.1/lib/abstract_controller/helpers.rb#13
556
+ def _helper_methods; end
557
+
558
+ # source://actionpack/7.2.1/lib/abstract_controller/helpers.rb#13
559
+ def _helper_methods=(_arg0); end
560
+
561
+ # source://actionpack/7.2.1/lib/abstract_controller/helpers.rb#13
562
+ def _helper_methods?; end
563
+
564
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#212
565
+ def _layout_conditions; end
566
+
567
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#212
568
+ def _layout_conditions?; end
569
+
570
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#924
571
+ def _process_action_callbacks; end
572
+
573
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#912
574
+ def _run_deliver_callbacks(&block); end
575
+
576
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#912
577
+ def _run_process_action_callbacks(&block); end
578
+
579
+ # source://actionpack/7.2.1/lib/abstract_controller/caching.rb#44
580
+ def _view_cache_dependencies; end
581
+
582
+ # source://actionpack/7.2.1/lib/abstract_controller/caching.rb#44
583
+ def _view_cache_dependencies=(_arg0); end
584
+
585
+ # source://actionpack/7.2.1/lib/abstract_controller/caching.rb#44
586
+ def _view_cache_dependencies?; end
587
+
588
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
589
+ def asset_host; end
590
+
591
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
592
+ def asset_host=(value); end
593
+
594
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
595
+ def assets_dir; end
596
+
597
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
598
+ def assets_dir=(value); end
599
+
600
+ # Allows you to add attachments to an email, like so:
601
+ #
602
+ # mail.attachments['filename.jpg'] = File.read('/path/to/filename.jpg')
603
+ #
604
+ # If you do this, then Mail will take the file name and work out the mime type.
605
+ # It will also set the +Content-Type+, +Content-Disposition+, and +Content-Transfer-Encoding+,
606
+ # and encode the contents of the attachment in Base64.
607
+ #
608
+ # You can also specify overrides if you want by passing a hash instead of a string:
609
+ #
610
+ # mail.attachments['filename.jpg'] = {mime_type: 'application/gzip',
611
+ # content: File.read('/path/to/filename.jpg')}
612
+ #
613
+ # If you want to use encoding other than Base64 then you will need to pass encoding
614
+ # type along with the pre-encoded content as Mail doesn't know how to decode the
615
+ # data:
616
+ #
617
+ # file_content = SpecialEncode(File.read('/path/to/filename.jpg'))
618
+ # mail.attachments['filename.jpg'] = {mime_type: 'application/gzip',
619
+ # content: file_content }
620
+ #
621
+ # You can also search for specific attachments:
622
+ #
623
+ # # By Filename
624
+ # mail.attachments['filename.jpg'] # => Mail::Part object or nil
625
+ #
626
+ # # or by index
627
+ # mail.attachments[0] # => Mail::Part (first attachment)
628
+ #
629
+ # source://actionmailer//lib/action_mailer/base.rb#760
630
+ def attachments; end
631
+
632
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
633
+ def default_asset_host_protocol; end
634
+
635
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
636
+ def default_asset_host_protocol=(value); end
637
+
638
+ # source://actionmailer//lib/action_mailer/base.rb#502
639
+ def default_params; end
640
+
641
+ # source://actionmailer//lib/action_mailer/base.rb#502
642
+ def default_params=(_arg0); end
643
+
644
+ # source://actionmailer//lib/action_mailer/base.rb#502
645
+ def default_params?; end
646
+
647
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
648
+ def default_static_extension; end
649
+
650
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
651
+ def default_static_extension=(value); end
652
+
653
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#9
654
+ def deliver_later_queue_name; end
655
+
656
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#9
657
+ def deliver_later_queue_name=(_arg0); end
658
+
659
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#9
660
+ def deliver_later_queue_name?; end
661
+
662
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#8
663
+ def delivery_job; end
664
+
665
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#8
666
+ def delivery_job=(_arg0); end
667
+
668
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#8
669
+ def delivery_job?; end
670
+
671
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#19
672
+ def delivery_method; end
673
+
674
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#19
675
+ def delivery_method=(_arg0); end
676
+
677
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#19
678
+ def delivery_method?; end
679
+
680
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#18
681
+ def delivery_methods; end
682
+
683
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#18
684
+ def delivery_methods=(_arg0); end
685
+
686
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#18
687
+ def delivery_methods?; end
688
+
689
+ # Returns an email in the format "Name <email@example.com>".
690
+ #
691
+ # If the name is a blank string, it returns just the address.
692
+ #
693
+ # source://actionmailer//lib/action_mailer/base.rb#684
694
+ def email_address_with_name(address, name); end
695
+
696
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
697
+ def enable_fragment_cache_logging; end
698
+
699
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
700
+ def enable_fragment_cache_logging=(value); end
701
+
702
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
703
+ def file_settings; end
704
+
705
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
706
+ def file_settings=(_arg0); end
707
+
708
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
709
+ def file_settings?; end
710
+
711
+ # source://actionpack/7.2.1/lib/abstract_controller/caching/fragments.rb#26
712
+ def fragment_cache_keys; end
713
+
714
+ # source://actionpack/7.2.1/lib/abstract_controller/caching/fragments.rb#26
715
+ def fragment_cache_keys=(_arg0); end
716
+
717
+ # source://actionpack/7.2.1/lib/abstract_controller/caching/fragments.rb#26
718
+ def fragment_cache_keys?; end
719
+
720
+ # Allows you to pass random and unusual headers to the new +Mail::Message+
721
+ # object which will add them to itself.
722
+ #
723
+ # headers['X-Special-Domain-Specific-Header'] = "SecretValue"
724
+ #
725
+ # You can also pass a hash into headers of header field names and values,
726
+ # which will then be set on the +Mail::Message+ object:
727
+ #
728
+ # headers 'X-Special-Domain-Specific-Header' => "SecretValue",
729
+ # 'In-Reply-To' => incoming.message_id
730
+ #
731
+ # The resulting +Mail::Message+ will have the following in its header:
732
+ #
733
+ # X-Special-Domain-Specific-Header: SecretValue
734
+ #
735
+ # Note about replacing already defined headers:
736
+ #
737
+ # * +subject+
738
+ # * +sender+
739
+ # * +from+
740
+ # * +to+
741
+ # * +cc+
742
+ # * +bcc+
743
+ # * +reply-to+
744
+ # * +orig-date+
745
+ # * +message-id+
746
+ # * +references+
747
+ #
748
+ # Fields can only appear once in email headers while other fields such as
749
+ # <tt>X-Anything</tt> can appear multiple times.
750
+ #
751
+ # If you want to replace any header which already exists, first set it to
752
+ # +nil+ in order to reset the value otherwise another field will be added
753
+ # for the same header.
754
+ #
755
+ # source://actionmailer//lib/action_mailer/base.rb#722
756
+ def headers(args = T.unsafe(nil)); end
757
+
758
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
759
+ def javascripts_dir; end
760
+
761
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
762
+ def javascripts_dir=(value); end
763
+
764
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
765
+ def logger; end
766
+
767
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
768
+ def logger=(value); end
769
+
770
+ # The main method that creates the message and renders the email templates. There are
771
+ # two ways to call this method, with a block, or without a block.
772
+ #
773
+ # It accepts a headers hash. This hash allows you to specify
774
+ # the most used headers in an email message, these are:
775
+ #
776
+ # * +:subject+ - The subject of the message, if this is omitted, Action Mailer will
777
+ # ask the \Rails I18n class for a translated +:subject+ in the scope of
778
+ # <tt>[mailer_scope, action_name]</tt> or if this is missing, will translate the
779
+ # humanized version of the +action_name+
780
+ # * +:to+ - Who the message is destined for, can be a string of addresses, or an array
781
+ # of addresses.
782
+ # * +:from+ - Who the message is from
783
+ # * +:cc+ - Who you would like to Carbon-Copy on this email, can be a string of addresses,
784
+ # or an array of addresses.
785
+ # * +:bcc+ - Who you would like to Blind-Carbon-Copy on this email, can be a string of
786
+ # addresses, or an array of addresses.
787
+ # * +:reply_to+ - Who to set the +Reply-To+ header of the email to.
788
+ # * +:date+ - The date to say the email was sent on.
789
+ #
790
+ # You can set default values for any of the above headers (except +:date+)
791
+ # by using the ::default class method:
792
+ #
793
+ # class Notifier < ActionMailer::Base
794
+ # default from: 'no-reply@test.lindsaar.net',
795
+ # bcc: 'email_logger@test.lindsaar.net',
796
+ # reply_to: 'bounces@test.lindsaar.net'
797
+ # end
798
+ #
799
+ # If you need other headers not listed above, you can either pass them in
800
+ # as part of the headers hash or use the <tt>headers['name'] = value</tt>
801
+ # method.
802
+ #
803
+ # When a +:return_path+ is specified as header, that value will be used as
804
+ # the 'envelope from' address for the Mail message. Setting this is useful
805
+ # when you want delivery notifications sent to a different address than the
806
+ # one in +:from+. Mail will actually use the +:return_path+ in preference
807
+ # to the +:sender+ in preference to the +:from+ field for the 'envelope
808
+ # from' value.
809
+ #
810
+ # If you do not pass a block to the +mail+ method, it will find all
811
+ # templates in the view paths using by default the mailer name and the
812
+ # method name that it is being called from, it will then create parts for
813
+ # each of these templates intelligently, making educated guesses on correct
814
+ # content type and sequence, and return a fully prepared +Mail::Message+
815
+ # ready to call <tt>:deliver</tt> on to send.
816
+ #
817
+ # For example:
818
+ #
819
+ # class Notifier < ActionMailer::Base
820
+ # default from: 'no-reply@test.lindsaar.net'
821
+ #
822
+ # def welcome
823
+ # mail(to: 'mikel@test.lindsaar.net')
824
+ # end
825
+ # end
826
+ #
827
+ # Will look for all templates at "app/views/notifier" with name "welcome".
828
+ # If no welcome template exists, it will raise an ActionView::MissingTemplate error.
829
+ #
830
+ # However, those can be customized:
831
+ #
832
+ # mail(template_path: 'notifications', template_name: 'another')
833
+ #
834
+ # And now it will look for all templates at "app/views/notifications" with name "another".
835
+ #
836
+ # If you do pass a block, you can render specific templates of your choice:
837
+ #
838
+ # mail(to: 'mikel@test.lindsaar.net') do |format|
839
+ # format.text
840
+ # format.html
841
+ # end
842
+ #
843
+ # You can even render plain text directly without using a template:
844
+ #
845
+ # mail(to: 'mikel@test.lindsaar.net') do |format|
846
+ # format.text { render plain: "Hello Mikel!" }
847
+ # format.html { render html: "<h1>Hello Mikel!</h1>".html_safe }
848
+ # end
849
+ #
850
+ # Which will render a +multipart/alternative+ email with +text/plain+ and
851
+ # +text/html+ parts.
852
+ #
853
+ # The block syntax also allows you to customize the part headers if desired:
854
+ #
855
+ # mail(to: 'mikel@test.lindsaar.net') do |format|
856
+ # format.html
857
+ # end
858
+ #
859
+ # source://actionmailer//lib/action_mailer/base.rb#869
860
+ def mail(headers = T.unsafe(nil), &block); end
861
+
862
+ # Returns the name of the mailer object.
863
+ #
864
+ # source://actionmailer//lib/action_mailer/base.rb#677
865
+ def mailer_name; end
866
+
867
+ # source://activesupport/7.2.1/lib/active_support/core_ext/module/attr_internal.rb#44
868
+ def message; end
869
+
870
+ # source://activesupport/7.2.1/lib/active_support/core_ext/module/attr_internal.rb#44
871
+ def message=(_arg0); end
872
+
873
+ # source://actionmailer//lib/action_mailer/parameterized.rb#95
874
+ def params; end
875
+
876
+ # source://actionmailer//lib/action_mailer/parameterized.rb#93
877
+ def params=(_arg0); end
878
+
879
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
880
+ def perform_caching; end
881
+
882
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
883
+ def perform_caching=(value); end
884
+
885
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#16
886
+ def perform_deliveries; end
887
+
888
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#16
889
+ def perform_deliveries=(val); end
890
+
891
+ # source://actionmailer//lib/action_mailer/preview.rb#25
892
+ def preview_interceptors; end
893
+
894
+ # source://actionmailer//lib/action_mailer/preview.rb#14
895
+ def preview_paths; end
896
+
897
+ # source://actionmailer//lib/action_mailer/base.rb#649
898
+ def process(method_name, *args, **_arg2); end
899
+
900
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#15
901
+ def raise_delivery_errors; end
902
+
903
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#15
904
+ def raise_delivery_errors=(val); end
905
+
906
+ # source://actionpack/7.2.1/lib/abstract_controller/callbacks.rb#36
907
+ def raise_on_missing_callback_actions; end
908
+
909
+ # source://actionpack/7.2.1/lib/abstract_controller/callbacks.rb#36
910
+ def raise_on_missing_callback_actions=(val); end
911
+
912
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
913
+ def relative_url_root; end
914
+
915
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
916
+ def relative_url_root=(value); end
917
+
918
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
919
+ def rescue_handlers; end
920
+
921
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
922
+ def rescue_handlers=(_arg0); end
923
+
924
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
925
+ def rescue_handlers?; end
926
+
927
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
928
+ def sendmail_settings; end
929
+
930
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
931
+ def sendmail_settings=(_arg0); end
932
+
933
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
934
+ def sendmail_settings?; end
935
+
936
+ # source://actionmailer//lib/action_mailer/preview.rb#22
937
+ def show_previews; end
938
+
939
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
940
+ def smtp_settings; end
941
+
942
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
943
+ def smtp_settings=(_arg0); end
944
+
945
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
946
+ def smtp_settings?; end
947
+
948
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
949
+ def stylesheets_dir; end
950
+
951
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
952
+ def stylesheets_dir=(value); end
953
+
954
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
955
+ def test_settings; end
956
+
957
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
958
+ def test_settings=(_arg0); end
959
+
960
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
961
+ def test_settings?; end
962
+
963
+ private
964
+
965
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#328
966
+ def _layout(lookup_context, formats); end
967
+
968
+ # source://actionmailer//lib/action_mailer/base.rb#1070
969
+ def _protected_ivars; end
970
+
971
+ # source://actionmailer//lib/action_mailer/base.rb#946
972
+ def apply_defaults(headers); end
973
+
974
+ # source://actionmailer//lib/action_mailer/base.rb#966
975
+ def assign_headers_to_message(message, headers); end
976
+
977
+ # source://actionmailer//lib/action_mailer/base.rb#972
978
+ def collect_responses(headers, &block); end
979
+
980
+ # @yield [collector]
981
+ #
982
+ # source://actionmailer//lib/action_mailer/base.rb#982
983
+ def collect_responses_from_block(headers); end
984
+
985
+ # source://actionmailer//lib/action_mailer/base.rb#996
986
+ def collect_responses_from_templates(headers); end
987
+
988
+ # source://actionmailer//lib/action_mailer/base.rb#989
989
+ def collect_responses_from_text(headers); end
990
+
991
+ # source://actionmailer//lib/action_mailer/base.rb#956
992
+ def compute_default(value); end
993
+
994
+ # source://actionmailer//lib/action_mailer/base.rb#1039
995
+ def create_parts_from_responses(m, responses); end
996
+
997
+ # Translates the +subject+ using \Rails I18n class under <tt>[mailer_scope, action_name]</tt> scope.
998
+ # If it does not find a translation for the +subject+ under the specified scope it will default to a
999
+ # humanized version of the <tt>action_name</tt>.
1000
+ # If the subject has interpolations, you can pass them through the +interpolations+ parameter.
1001
+ #
1002
+ # source://actionmailer//lib/action_mailer/base.rb#936
1003
+ def default_i18n_subject(interpolations = T.unsafe(nil)); end
1004
+
1005
+ # source://actionmailer//lib/action_mailer/base.rb#1009
1006
+ def each_template(paths, name, &block); end
1007
+
1008
+ # source://actionmailer//lib/action_mailer/base.rb#1052
1009
+ def insert_part(container, response, charset); end
1010
+
1011
+ # source://actionmailer//lib/action_mailer/base.rb#1066
1012
+ def instrument_name; end
1013
+
1014
+ # This and #instrument_name is for caching instrument
1015
+ #
1016
+ # source://actionmailer//lib/action_mailer/base.rb#1059
1017
+ def instrument_payload(key); end
1018
+
1019
+ # Used by #mail to set the content type of the message.
1020
+ #
1021
+ # It will use the given +user_content_type+, or multipart if the mail
1022
+ # message has any attachments. If the attachments are inline, the content
1023
+ # type will be "multipart/related", otherwise "multipart/mixed".
1024
+ #
1025
+ # If there is no content type passed in via headers, and there are no
1026
+ # attachments, or the message is multipart, then the default content type is
1027
+ # used.
1028
+ #
1029
+ # source://actionmailer//lib/action_mailer/base.rb#914
1030
+ def set_content_type(m, user_content_type, class_default); end
1031
+
1032
+ # source://actionmailer//lib/action_mailer/base.rb#1018
1033
+ def wrap_inline_attachments(message); end
1034
+
1035
+ class << self
1036
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
1037
+ def __callbacks; end
1038
+
1039
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
1040
+ def __callbacks=(value); end
1041
+
1042
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
1043
+ def __callbacks?; end
1044
+
1045
+ # source://actionmailer//lib/action_mailer/form_builder.rb#18
1046
+ def _default_form_builder; end
1047
+
1048
+ # source://actionmailer//lib/action_mailer/form_builder.rb#18
1049
+ def _default_form_builder=(value); end
1050
+
1051
+ # source://actionmailer//lib/action_mailer/form_builder.rb#18
1052
+ def _default_form_builder?; end
1053
+
1054
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#916
1055
+ def _deliver_callbacks; end
1056
+
1057
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#920
1058
+ def _deliver_callbacks=(value); end
1059
+
1060
+ # source://actionpack/7.2.1/lib/abstract_controller/helpers.rb#13
1061
+ def _helper_methods; end
1062
+
1063
+ # source://actionpack/7.2.1/lib/abstract_controller/helpers.rb#13
1064
+ def _helper_methods=(value); end
1065
+
1066
+ # source://actionpack/7.2.1/lib/abstract_controller/helpers.rb#13
1067
+ def _helper_methods?; end
1068
+
1069
+ # source://actionpack/7.2.1/lib/abstract_controller/helpers.rb#17
1070
+ def _helpers; end
1071
+
1072
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#211
1073
+ def _layout; end
1074
+
1075
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#211
1076
+ def _layout=(value); end
1077
+
1078
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#211
1079
+ def _layout?; end
1080
+
1081
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#212
1082
+ def _layout_conditions; end
1083
+
1084
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#212
1085
+ def _layout_conditions=(value); end
1086
+
1087
+ # source://actionview/7.2.1/lib/action_view/layouts.rb#212
1088
+ def _layout_conditions?; end
1089
+
1090
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#916
1091
+ def _process_action_callbacks; end
1092
+
1093
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#920
1094
+ def _process_action_callbacks=(value); end
1095
+
1096
+ # source://actionpack/7.2.1/lib/abstract_controller/caching.rb#44
1097
+ def _view_cache_dependencies; end
1098
+
1099
+ # source://actionpack/7.2.1/lib/abstract_controller/caching.rb#44
1100
+ def _view_cache_dependencies=(value); end
1101
+
1102
+ # source://actionpack/7.2.1/lib/abstract_controller/caching.rb#44
1103
+ def _view_cache_dependencies?; end
1104
+
1105
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1106
+ def asset_host; end
1107
+
1108
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1109
+ def asset_host=(value); end
1110
+
1111
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1112
+ def assets_dir; end
1113
+
1114
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1115
+ def assets_dir=(value); end
1116
+
1117
+ # Returns the name of the current mailer. This method is also being used as a path for a view lookup.
1118
+ # If this is an anonymous mailer, this method will return +anonymous+ instead.
1119
+ #
1120
+ # source://actionmailer//lib/action_mailer/base.rb#570
1121
+ def controller_path; end
1122
+
1123
+ # Sets the defaults through app configuration:
1124
+ #
1125
+ # config.action_mailer.default(from: "no-reply@example.org")
1126
+ #
1127
+ # Aliased by ::default_options=
1128
+ #
1129
+ # source://actionmailer//lib/action_mailer/base.rb#582
1130
+ def default(value = T.unsafe(nil)); end
1131
+
1132
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1133
+ def default_asset_host_protocol; end
1134
+
1135
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1136
+ def default_asset_host_protocol=(value); end
1137
+
1138
+ # Sets the defaults through app configuration:
1139
+ #
1140
+ # config.action_mailer.default(from: "no-reply@example.org")
1141
+ #
1142
+ # Aliased by ::default_options=
1143
+ # Allows to set defaults through app configuration:
1144
+ #
1145
+ # config.action_mailer.default_options = { from: "no-reply@example.org" }
1146
+ #
1147
+ # source://actionmailer//lib/action_mailer/base.rb#582
1148
+ def default_options=(value = T.unsafe(nil)); end
1149
+
1150
+ # source://actionmailer//lib/action_mailer/base.rb#502
1151
+ def default_params; end
1152
+
1153
+ # source://actionmailer//lib/action_mailer/base.rb#502
1154
+ def default_params=(value); end
1155
+
1156
+ # source://actionmailer//lib/action_mailer/base.rb#502
1157
+ def default_params?; end
1158
+
1159
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1160
+ def default_static_extension; end
1161
+
1162
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1163
+ def default_static_extension=(value); end
1164
+
1165
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#9
1166
+ def deliver_later_queue_name; end
1167
+
1168
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#9
1169
+ def deliver_later_queue_name=(value); end
1170
+
1171
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#9
1172
+ def deliver_later_queue_name?; end
1173
+
1174
+ # Wraps an email delivery inside of ActiveSupport::Notifications instrumentation.
1175
+ #
1176
+ # This method is actually called by the +Mail::Message+ object itself
1177
+ # through a callback when you call <tt>:deliver</tt> on the +Mail::Message+,
1178
+ # calling +deliver_mail+ directly and passing a +Mail::Message+ will do
1179
+ # nothing except tell the logger you sent the email.
1180
+ #
1181
+ # source://actionmailer//lib/action_mailer/base.rb#597
1182
+ def deliver_mail(mail); end
1183
+
1184
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#8
1185
+ def delivery_job; end
1186
+
1187
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#8
1188
+ def delivery_job=(value); end
1189
+
1190
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#8
1191
+ def delivery_job?; end
1192
+
1193
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#19
1194
+ def delivery_method; end
1195
+
1196
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#19
1197
+ def delivery_method=(value); end
1198
+
1199
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#19
1200
+ def delivery_method?; end
1201
+
1202
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#18
1203
+ def delivery_methods; end
1204
+
1205
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#18
1206
+ def delivery_methods=(value); end
1207
+
1208
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#18
1209
+ def delivery_methods?; end
1210
+
1211
+ # Returns an email in the format "Name <email@example.com>".
1212
+ #
1213
+ # If the name is a blank string, it returns just the address.
1214
+ #
1215
+ # source://actionmailer//lib/action_mailer/base.rb#607
1216
+ def email_address_with_name(address, name); end
1217
+
1218
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1219
+ def enable_fragment_cache_logging; end
1220
+
1221
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1222
+ def enable_fragment_cache_logging=(value); end
1223
+
1224
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1225
+ def file_settings; end
1226
+
1227
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1228
+ def file_settings=(value); end
1229
+
1230
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1231
+ def file_settings?; end
1232
+
1233
+ # source://actionpack/7.2.1/lib/abstract_controller/caching/fragments.rb#26
1234
+ def fragment_cache_keys; end
1235
+
1236
+ # source://actionpack/7.2.1/lib/abstract_controller/caching/fragments.rb#26
1237
+ def fragment_cache_keys=(value); end
1238
+
1239
+ # source://actionpack/7.2.1/lib/abstract_controller/caching/fragments.rb#26
1240
+ def fragment_cache_keys?; end
1241
+
1242
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1243
+ def javascripts_dir; end
1244
+
1245
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1246
+ def javascripts_dir=(value); end
1247
+
1248
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1249
+ def logger; end
1250
+
1251
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1252
+ def logger=(value); end
1253
+
1254
+ # Returns the name of the current mailer. This method is also being used as a path for a view lookup.
1255
+ # If this is an anonymous mailer, this method will return +anonymous+ instead.
1256
+ #
1257
+ # source://actionmailer//lib/action_mailer/base.rb#570
1258
+ def mailer_name; end
1259
+
1260
+ # Allows to set the name of current mailer.
1261
+ #
1262
+ # source://actionmailer//lib/action_mailer/base.rb#574
1263
+ def mailer_name=(_arg0); end
1264
+
1265
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1266
+ def perform_caching; end
1267
+
1268
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1269
+ def perform_caching=(value); end
1270
+
1271
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#16
1272
+ def perform_deliveries; end
1273
+
1274
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#16
1275
+ def perform_deliveries=(val); end
1276
+
1277
+ # source://actionmailer//lib/action_mailer/preview.rb#25
1278
+ def preview_interceptors; end
1279
+
1280
+ # source://actionmailer//lib/action_mailer/preview.rb#25
1281
+ def preview_interceptors=(val); end
1282
+
1283
+ # source://actionmailer//lib/action_mailer/preview.rb#14
1284
+ def preview_paths; end
1285
+
1286
+ # source://actionmailer//lib/action_mailer/preview.rb#14
1287
+ def preview_paths=(val); end
1288
+
1289
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#15
1290
+ def raise_delivery_errors; end
1291
+
1292
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#15
1293
+ def raise_delivery_errors=(val); end
1294
+
1295
+ # source://actionpack/7.2.1/lib/abstract_controller/callbacks.rb#36
1296
+ def raise_on_missing_callback_actions; end
1297
+
1298
+ # source://actionpack/7.2.1/lib/abstract_controller/callbacks.rb#36
1299
+ def raise_on_missing_callback_actions=(val); end
1300
+
1301
+ # Register an Interceptor which will be called before mail is sent.
1302
+ # Either a class, string, or symbol can be passed in as the Interceptor.
1303
+ # If a string or symbol is passed in it will be camelized and constantized.
1304
+ #
1305
+ # source://actionmailer//lib/action_mailer/base.rb#547
1306
+ def register_interceptor(interceptor); end
1307
+
1308
+ # Register one or more Interceptors which will be called before mail is sent.
1309
+ #
1310
+ # source://actionmailer//lib/action_mailer/base.rb#521
1311
+ def register_interceptors(*interceptors); end
1312
+
1313
+ # Register an Observer which will be notified when mail is delivered.
1314
+ # Either a class, string, or symbol can be passed in as the Observer.
1315
+ # If a string or symbol is passed in it will be camelized and constantized.
1316
+ #
1317
+ # source://actionmailer//lib/action_mailer/base.rb#533
1318
+ def register_observer(observer); end
1319
+
1320
+ # Register one or more Observers which will be notified when mail is delivered.
1321
+ #
1322
+ # source://actionmailer//lib/action_mailer/base.rb#511
1323
+ def register_observers(*observers); end
1324
+
1325
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1326
+ def relative_url_root; end
1327
+
1328
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1329
+ def relative_url_root=(value); end
1330
+
1331
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
1332
+ def rescue_handlers; end
1333
+
1334
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
1335
+ def rescue_handlers=(value); end
1336
+
1337
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
1338
+ def rescue_handlers?; end
1339
+
1340
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1341
+ def sendmail_settings; end
1342
+
1343
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1344
+ def sendmail_settings=(value); end
1345
+
1346
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1347
+ def sendmail_settings?; end
1348
+
1349
+ # source://actionmailer//lib/action_mailer/preview.rb#22
1350
+ def show_previews; end
1351
+
1352
+ # source://actionmailer//lib/action_mailer/preview.rb#22
1353
+ def show_previews=(val); end
1354
+
1355
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1356
+ def smtp_settings; end
1357
+
1358
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1359
+ def smtp_settings=(value); end
1360
+
1361
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1362
+ def smtp_settings?; end
1363
+
1364
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#115
1365
+ def stylesheets_dir; end
1366
+
1367
+ # source://activesupport/7.2.1/lib/active_support/configurable.rb#116
1368
+ def stylesheets_dir=(value); end
1369
+
1370
+ # Emails do not support relative path links.
1371
+ #
1372
+ # @return [Boolean]
1373
+ #
1374
+ # source://actionmailer//lib/action_mailer/base.rb#942
1375
+ def supports_path?; end
1376
+
1377
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1378
+ def test_settings; end
1379
+
1380
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1381
+ def test_settings=(value); end
1382
+
1383
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#52
1384
+ def test_settings?; end
1385
+
1386
+ # Unregister a previously registered Interceptor.
1387
+ # Either a class, string, or symbol can be passed in as the Interceptor.
1388
+ # If a string or symbol is passed in it will be camelized and constantized.
1389
+ #
1390
+ # source://actionmailer//lib/action_mailer/base.rb#554
1391
+ def unregister_interceptor(interceptor); end
1392
+
1393
+ # Unregister one or more previously registered Interceptors.
1394
+ #
1395
+ # source://actionmailer//lib/action_mailer/base.rb#526
1396
+ def unregister_interceptors(*interceptors); end
1397
+
1398
+ # Unregister a previously registered Observer.
1399
+ # Either a class, string, or symbol can be passed in as the Observer.
1400
+ # If a string or symbol is passed in it will be camelized and constantized.
1401
+ #
1402
+ # source://actionmailer//lib/action_mailer/base.rb#540
1403
+ def unregister_observer(observer); end
1404
+
1405
+ # Unregister one or more previously registered Observers.
1406
+ #
1407
+ # source://actionmailer//lib/action_mailer/base.rb#516
1408
+ def unregister_observers(*observers); end
1409
+
1410
+ private
1411
+
1412
+ # source://actionmailer//lib/action_mailer/base.rb#628
1413
+ def method_missing(method_name, *_arg1, **_arg2, &_arg3); end
1414
+
1415
+ # source://actionmailer//lib/action_mailer/base.rb#558
1416
+ def observer_class_for(value); end
1417
+
1418
+ # @return [Boolean]
1419
+ #
1420
+ # source://actionmailer//lib/action_mailer/base.rb#636
1421
+ def respond_to_missing?(method, include_all = T.unsafe(nil)); end
1422
+
1423
+ # source://actionmailer//lib/action_mailer/base.rb#615
1424
+ def set_payload_for_mail(payload, mail); end
1425
+ end
1426
+ end
1427
+
1428
+ # source://actionmailer//lib/action_mailer/base.rb#0
1429
+ module ActionMailer::Base::HelperMethods
1430
+ include ::ActionMailer::MailHelper
1431
+ include ::ActionText::ContentHelper
1432
+ include ::ActionText::TagHelper
1433
+
1434
+ # source://actionpack/7.2.1/lib/abstract_controller/caching/fragments.rb#34
1435
+ def combined_fragment_cache_key(*_arg0, **_arg1, &_arg2); end
1436
+
1437
+ # source://actionpack/7.2.1/lib/abstract_controller/caching.rb#45
1438
+ def view_cache_dependencies(*_arg0, **_arg1, &_arg2); end
1439
+ end
1440
+
1441
+ # source://actionmailer//lib/action_mailer/base.rb#768
1442
+ class ActionMailer::Base::LateAttachmentsProxy < ::SimpleDelegator
1443
+ # source://actionmailer//lib/action_mailer/base.rb#770
1444
+ def []=(_name, _content); end
1445
+
1446
+ # source://actionmailer//lib/action_mailer/base.rb#769
1447
+ def inline; end
1448
+
1449
+ private
1450
+
1451
+ # @raise [RuntimeError]
1452
+ #
1453
+ # source://actionmailer//lib/action_mailer/base.rb#773
1454
+ def _raise_error; end
1455
+ end
1456
+
1457
+ # source://actionmailer//lib/action_mailer/base.rb#663
1458
+ class ActionMailer::Base::NullMail
1459
+ # source://actionmailer//lib/action_mailer/base.rb#664
1460
+ def body; end
1461
+
1462
+ # source://actionmailer//lib/action_mailer/base.rb#665
1463
+ def header; end
1464
+
1465
+ # source://actionmailer//lib/action_mailer/base.rb#671
1466
+ def method_missing(*_arg0, **_arg1, &_arg2); end
1467
+
1468
+ # @return [Boolean]
1469
+ #
1470
+ # source://actionmailer//lib/action_mailer/base.rb#667
1471
+ def respond_to?(string, include_all = T.unsafe(nil)); end
1472
+ end
1473
+
1474
+ # source://actionmailer//lib/action_mailer/base.rb#498
1475
+ ActionMailer::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array)
1476
+
1477
+ # source://actionmailer//lib/action_mailer/callbacks.rb#4
1478
+ module ActionMailer::Callbacks
1479
+ extend ::ActiveSupport::Concern
1480
+ include GeneratedInstanceMethods
1481
+ include ::ActiveSupport::Callbacks
1482
+
1483
+ mixes_in_class_methods GeneratedClassMethods
1484
+ mixes_in_class_methods ::ActionMailer::Callbacks::ClassMethods
1485
+ mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods
1486
+ mixes_in_class_methods ::ActiveSupport::DescendantsTracker
1487
+
1488
+ module GeneratedClassMethods
1489
+ def __callbacks; end
1490
+ def __callbacks=(value); end
1491
+ def __callbacks?; end
1492
+ end
1493
+
1494
+ module GeneratedInstanceMethods
1495
+ def __callbacks; end
1496
+ def __callbacks?; end
1497
+ end
1498
+ end
1499
+
1500
+ # source://actionmailer//lib/action_mailer/callbacks.rb#12
1501
+ module ActionMailer::Callbacks::ClassMethods
1502
+ # Defines a callback that will get called right after the
1503
+ # message's delivery method is finished.
1504
+ #
1505
+ # source://actionmailer//lib/action_mailer/callbacks.rb#21
1506
+ def after_deliver(*filters, &blk); end
1507
+
1508
+ # Defines a callback that will get called around the message's deliver method.
1509
+ #
1510
+ # source://actionmailer//lib/action_mailer/callbacks.rb#26
1511
+ def around_deliver(*filters, &blk); end
1512
+
1513
+ # Defines a callback that will get called right before the
1514
+ # message is sent to the delivery method.
1515
+ #
1516
+ # source://actionmailer//lib/action_mailer/callbacks.rb#15
1517
+ def before_deliver(*filters, &blk); end
1518
+ end
1519
+
1520
+ # source://actionmailer//lib/action_mailer/collector.rb#8
1521
+ class ActionMailer::Collector
1522
+ include ::AbstractController::Collector
1523
+
1524
+ # @return [Collector] a new instance of Collector
1525
+ #
1526
+ # source://actionmailer//lib/action_mailer/collector.rb#12
1527
+ def initialize(context, &block); end
1528
+
1529
+ # @raise [ArgumentError]
1530
+ #
1531
+ # source://actionmailer//lib/action_mailer/collector.rb#18
1532
+ def all(*args, &block); end
1533
+
1534
+ # @raise [ArgumentError]
1535
+ #
1536
+ # source://actionmailer//lib/action_mailer/collector.rb#18
1537
+ def any(*args, &block); end
1538
+
1539
+ # source://actionmailer//lib/action_mailer/collector.rb#25
1540
+ def custom(mime, options = T.unsafe(nil)); end
1541
+
1542
+ # Returns the value of attribute responses.
1543
+ #
1544
+ # source://actionmailer//lib/action_mailer/collector.rb#10
1545
+ def responses; end
1546
+ end
1547
+
1548
+ # = Action Mailer \DeliveryMethods
1549
+ #
1550
+ # This module handles everything related to mail delivery, from registering
1551
+ # new delivery methods to configuring the mail object to be sent.
1552
+ #
1553
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#10
1554
+ module ActionMailer::DeliveryMethods
1555
+ extend ::ActiveSupport::Concern
1556
+ include GeneratedInstanceMethods
1557
+
1558
+ mixes_in_class_methods GeneratedClassMethods
1559
+ mixes_in_class_methods ::ActionMailer::DeliveryMethods::ClassMethods
1560
+
1561
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#79
1562
+ def wrap_delivery_behavior!(*args); end
1563
+
1564
+ module GeneratedClassMethods
1565
+ def delivery_method; end
1566
+ def delivery_method=(value); end
1567
+ def delivery_method?; end
1568
+ def delivery_methods; end
1569
+ def delivery_methods=(value); end
1570
+ def delivery_methods?; end
1571
+ def file_settings; end
1572
+ def file_settings=(value); end
1573
+ def file_settings?; end
1574
+ def sendmail_settings; end
1575
+ def sendmail_settings=(value); end
1576
+ def sendmail_settings?; end
1577
+ def smtp_settings; end
1578
+ def smtp_settings=(value); end
1579
+ def smtp_settings?; end
1580
+ def test_settings; end
1581
+ def test_settings=(value); end
1582
+ def test_settings?; end
1583
+ end
1584
+
1585
+ module GeneratedInstanceMethods
1586
+ def delivery_method; end
1587
+ def delivery_method=(value); end
1588
+ def delivery_method?; end
1589
+ def delivery_methods; end
1590
+ def delivery_methods=(value); end
1591
+ def delivery_methods?; end
1592
+ def file_settings; end
1593
+ def file_settings=(value); end
1594
+ def file_settings?; end
1595
+ def sendmail_settings; end
1596
+ def sendmail_settings=(value); end
1597
+ def sendmail_settings?; end
1598
+ def smtp_settings; end
1599
+ def smtp_settings=(value); end
1600
+ def smtp_settings?; end
1601
+ def test_settings; end
1602
+ def test_settings=(value); end
1603
+ def test_settings?; end
1604
+ end
1605
+ end
1606
+
1607
+ # Helpers for creating and wrapping delivery behavior, used by DeliveryMethods.
1608
+ #
1609
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#41
1610
+ module ActionMailer::DeliveryMethods::ClassMethods
1611
+ # Adds a new delivery method through the given class using the given
1612
+ # symbol as alias and the default options supplied.
1613
+ #
1614
+ # add_delivery_method :sendmail, Mail::Sendmail,
1615
+ # location: '/usr/sbin/sendmail',
1616
+ # arguments: %w[ -i ]
1617
+ #
1618
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#51
1619
+ def add_delivery_method(symbol, klass, default_options = T.unsafe(nil)); end
1620
+
1621
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#43
1622
+ def deliveries(&_arg0); end
1623
+
1624
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#43
1625
+ def deliveries=(arg); end
1626
+
1627
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#57
1628
+ def wrap_delivery_behavior(mail, method = T.unsafe(nil), options = T.unsafe(nil)); end
1629
+ end
1630
+
1631
+ # = Action Mailer Form Builder
1632
+ #
1633
+ # Override the default form builder for all views rendered by this
1634
+ # mailer and any of its descendants. Accepts a subclass of
1635
+ # ActionView::Helpers::FormBuilder.
1636
+ #
1637
+ # While emails typically will not include forms, this can be used
1638
+ # by views that are shared between controllers and mailers.
1639
+ #
1640
+ # For more information, see +ActionController::FormBuilder+.
1641
+ #
1642
+ # source://actionmailer//lib/action_mailer/form_builder.rb#14
1643
+ module ActionMailer::FormBuilder
1644
+ extend ::ActiveSupport::Concern
1645
+ include GeneratedInstanceMethods
1646
+
1647
+ mixes_in_class_methods GeneratedClassMethods
1648
+ mixes_in_class_methods ::ActionMailer::FormBuilder::ClassMethods
1649
+
1650
+ # Default form builder for the mailer
1651
+ #
1652
+ # source://actionmailer//lib/action_mailer/form_builder.rb#33
1653
+ def default_form_builder; end
1654
+
1655
+ module GeneratedClassMethods
1656
+ def _default_form_builder; end
1657
+ def _default_form_builder=(value); end
1658
+ def _default_form_builder?; end
1659
+ end
1660
+
1661
+ module GeneratedInstanceMethods; end
1662
+ end
1663
+
1664
+ # source://actionmailer//lib/action_mailer/form_builder.rb#21
1665
+ module ActionMailer::FormBuilder::ClassMethods
1666
+ # Set the form builder to be used as the default for all forms
1667
+ # in the views rendered by this mailer and its subclasses.
1668
+ #
1669
+ # ==== Parameters
1670
+ # * <tt>builder</tt> - Default form builder, an instance of ActionView::Helpers::FormBuilder
1671
+ #
1672
+ # source://actionmailer//lib/action_mailer/form_builder.rb#27
1673
+ def default_form_builder(builder); end
1674
+ end
1675
+
1676
+ # = Action Mailer \InlinePreviewInterceptor
1677
+ #
1678
+ # Implements a mailer preview interceptor that converts image tag src attributes
1679
+ # that use inline cid: style URLs to data: style URLs so that they are visible
1680
+ # when previewing an HTML email in a web browser.
1681
+ #
1682
+ # This interceptor is enabled by default. To disable it, delete it from the
1683
+ # <tt>ActionMailer::Base.preview_interceptors</tt> array:
1684
+ #
1685
+ # ActionMailer::Base.preview_interceptors.delete(ActionMailer::InlinePreviewInterceptor)
1686
+ #
1687
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#17
1688
+ class ActionMailer::InlinePreviewInterceptor
1689
+ include ::Base64
1690
+
1691
+ # @return [InlinePreviewInterceptor] a new instance of InlinePreviewInterceptor
1692
+ #
1693
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#26
1694
+ def initialize(message); end
1695
+
1696
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#30
1697
+ def transform!; end
1698
+
1699
+ private
1700
+
1701
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#51
1702
+ def data_url(part); end
1703
+
1704
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#55
1705
+ def find_part(cid); end
1706
+
1707
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#47
1708
+ def html_part; end
1709
+
1710
+ # Returns the value of attribute message.
1711
+ #
1712
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#45
1713
+ def message; end
1714
+
1715
+ class << self
1716
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#22
1717
+ def previewing_email(message); end
1718
+ end
1719
+ end
1720
+
1721
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#18
1722
+ ActionMailer::InlinePreviewInterceptor::PATTERN = T.let(T.unsafe(nil), Regexp)
1723
+
1724
+ # = Action Mailer \LogSubscriber
1725
+ #
1726
+ # Implements the ActiveSupport::LogSubscriber for logging notifications when
1727
+ # email is delivered or received.
1728
+ #
1729
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#10
1730
+ class ActionMailer::LogSubscriber < ::ActiveSupport::LogSubscriber
1731
+ # An email was delivered.
1732
+ #
1733
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#12
1734
+ def deliver(event); end
1735
+
1736
+ # Use the logger configured for ActionMailer::Base.
1737
+ #
1738
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#38
1739
+ def logger; end
1740
+
1741
+ # An email was generated.
1742
+ #
1743
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#28
1744
+ def process(event); end
1745
+
1746
+ class << self
1747
+ # source://activesupport/7.2.1/lib/active_support/log_subscriber.rb#84
1748
+ def log_levels; end
1749
+ end
1750
+ end
1751
+
1752
+ # = Action Mailer \MailDeliveryJob
1753
+ #
1754
+ # The +ActionMailer::MailDeliveryJob+ class is used when you
1755
+ # want to send emails outside of the request-response cycle. It supports
1756
+ # sending either parameterized or normal mail.
1757
+ #
1758
+ # Exceptions are rescued and handled by the mailer class.
1759
+ #
1760
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#13
1761
+ class ActionMailer::MailDeliveryJob < ::ActiveJob::Base
1762
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#21
1763
+ def perform(mailer, mail_method, delivery_method, args:, kwargs: T.unsafe(nil), params: T.unsafe(nil)); end
1764
+
1765
+ private
1766
+
1767
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#40
1768
+ def handle_exception_with_mailer_class(exception); end
1769
+
1770
+ # "Deserialize" the mailer class name by hand in case another argument
1771
+ # (like a Global ID reference) raised DeserializationError.
1772
+ #
1773
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#34
1774
+ def mailer_class; end
1775
+
1776
+ class << self
1777
+ # source://activejob/7.2.1/lib/active_job/queue_name.rb#55
1778
+ def queue_name; end
1779
+
1780
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
1781
+ def rescue_handlers; end
1782
+ end
1783
+ end
1784
+
1785
+ # = Action Mailer \MailHelper
1786
+ #
1787
+ # Provides helper methods for ActionMailer::Base that can be used for easily
1788
+ # formatting messages, accessing mailer or message instances, and the
1789
+ # attachments list.
1790
+ #
1791
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#9
1792
+ module ActionMailer::MailHelper
1793
+ # Access the message attachments list.
1794
+ #
1795
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#45
1796
+ def attachments; end
1797
+
1798
+ # Take the text and format it, indented two spaces for each line, and
1799
+ # wrapped at 72 columns:
1800
+ #
1801
+ # text = <<-TEXT
1802
+ # This is
1803
+ # the paragraph.
1804
+ #
1805
+ # * item1 * item2
1806
+ # TEXT
1807
+ #
1808
+ # block_format text
1809
+ # # => " This is the paragraph.\n\n * item1\n * item2\n"
1810
+ #
1811
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#22
1812
+ def block_format(text); end
1813
+
1814
+ # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces.
1815
+ # By default column length +len+ equals 72 characters and indent
1816
+ # +indent+ equal two spaces.
1817
+ #
1818
+ # my_text = 'Here is a sample text with more than 40 characters'
1819
+ #
1820
+ # format_paragraph(my_text, 25, 4)
1821
+ # # => " Here is a sample text with\n more than 40 characters"
1822
+ #
1823
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#57
1824
+ def format_paragraph(text, len = T.unsafe(nil), indent = T.unsafe(nil)); end
1825
+
1826
+ # Access the mailer instance.
1827
+ #
1828
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#35
1829
+ def mailer; end
1830
+
1831
+ # Access the message instance.
1832
+ #
1833
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#40
1834
+ def message; end
1835
+ end
1836
+
1837
+ # = Action Mailer \MessageDelivery
1838
+ #
1839
+ # The +ActionMailer::MessageDelivery+ class is used by
1840
+ # ActionMailer::Base when creating a new mailer.
1841
+ # <tt>MessageDelivery</tt> is a wrapper (+Delegator+ subclass) around a lazy
1842
+ # created +Mail::Message+. You can get direct access to the
1843
+ # +Mail::Message+, deliver the email or schedule the email to be sent
1844
+ # through Active Job.
1845
+ #
1846
+ # Notifier.welcome(User.first) # an ActionMailer::MessageDelivery object
1847
+ # Notifier.welcome(User.first).deliver_now # sends the email
1848
+ # Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job
1849
+ # Notifier.welcome(User.first).message # a Mail::Message object
1850
+ #
1851
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#19
1852
+ class ActionMailer::MessageDelivery
1853
+ # @return [MessageDelivery] a new instance of MessageDelivery
1854
+ #
1855
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#20
1856
+ def initialize(mailer_class, action, *args, **_arg3); end
1857
+
1858
+ # Method calls are delegated to the Mail::Message that's ready to deliver.
1859
+ #
1860
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#31
1861
+ def __getobj__; end
1862
+
1863
+ # Unused except for delegator internals (dup, marshalling).
1864
+ #
1865
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#36
1866
+ def __setobj__(mail_message); end
1867
+
1868
+ # Enqueues the email to be delivered through Active Job. When the
1869
+ # job runs it will send the email using +deliver_now+.
1870
+ #
1871
+ # Notifier.welcome(User.first).deliver_later
1872
+ # Notifier.welcome(User.first).deliver_later(wait: 1.hour)
1873
+ # Notifier.welcome(User.first).deliver_later(wait_until: 10.hours.from_now)
1874
+ # Notifier.welcome(User.first).deliver_later(priority: 10)
1875
+ #
1876
+ # Options:
1877
+ #
1878
+ # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay.
1879
+ # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time.
1880
+ # * <tt>:queue</tt> - Enqueue the email on the specified queue.
1881
+ # * <tt>:priority</tt> - Enqueues the email with the specified priority
1882
+ #
1883
+ # By default, the email will be enqueued using ActionMailer::MailDeliveryJob on
1884
+ # the default queue. Mailer classes can customize the queue name used for the default
1885
+ # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job
1886
+ # by assigning a +delivery_job+. When a custom job is used, it controls the queue name.
1887
+ #
1888
+ # class AccountRegistrationMailer < ApplicationMailer
1889
+ # self.delivery_job = RegistrationDeliveryJob
1890
+ # end
1891
+ #
1892
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#102
1893
+ def deliver_later(options = T.unsafe(nil)); end
1894
+
1895
+ # Enqueues the email to be delivered through Active Job. When the
1896
+ # job runs it will send the email using +deliver_now!+. That means
1897
+ # that the message will be sent bypassing checking +perform_deliveries+
1898
+ # and +raise_delivery_errors+, so use with caution.
1899
+ #
1900
+ # Notifier.welcome(User.first).deliver_later!
1901
+ # Notifier.welcome(User.first).deliver_later!(wait: 1.hour)
1902
+ # Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now)
1903
+ # Notifier.welcome(User.first).deliver_later!(priority: 10)
1904
+ #
1905
+ # Options:
1906
+ #
1907
+ # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
1908
+ # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time
1909
+ # * <tt>:queue</tt> - Enqueue the email on the specified queue
1910
+ # * <tt>:priority</tt> - Enqueues the email with the specified priority
1911
+ #
1912
+ # By default, the email will be enqueued using ActionMailer::MailDeliveryJob on
1913
+ # the default queue. Mailer classes can customize the queue name used for the default
1914
+ # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job
1915
+ # by assigning a +delivery_job+. When a custom job is used, it controls the queue name.
1916
+ #
1917
+ # class AccountRegistrationMailer < ApplicationMailer
1918
+ # self.delivery_job = RegistrationDeliveryJob
1919
+ # end
1920
+ #
1921
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#75
1922
+ def deliver_later!(options = T.unsafe(nil)); end
1923
+
1924
+ # Delivers an email:
1925
+ #
1926
+ # Notifier.welcome(User.first).deliver_now
1927
+ #
1928
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#123
1929
+ def deliver_now; end
1930
+
1931
+ # Delivers an email without checking +perform_deliveries+ and +raise_delivery_errors+,
1932
+ # so use with caution.
1933
+ #
1934
+ # Notifier.welcome(User.first).deliver_now!
1935
+ #
1936
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#111
1937
+ def deliver_now!; end
1938
+
1939
+ # Returns the resulting Mail::Message
1940
+ #
1941
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#41
1942
+ def message; end
1943
+
1944
+ # Was the delegate loaded, causing the mailer action to be processed?
1945
+ #
1946
+ # @return [Boolean]
1947
+ #
1948
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#46
1949
+ def processed?; end
1950
+
1951
+ private
1952
+
1953
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#140
1954
+ def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end
1955
+
1956
+ # Returns the processed Mailer instance. We keep this instance
1957
+ # on hand so we can run callbacks and delegate exception handling to it.
1958
+ #
1959
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#134
1960
+ def processed_mailer; end
1961
+ end
1962
+
1963
+ # source://actionmailer//lib/action_mailer/test_case.rb#7
1964
+ class ActionMailer::NonInferrableMailerError < ::StandardError
1965
+ # @return [NonInferrableMailerError] a new instance of NonInferrableMailerError
1966
+ #
1967
+ # source://actionmailer//lib/action_mailer/test_case.rb#8
1968
+ def initialize(name); end
1969
+ end
1970
+
1971
+ # = Action Mailer \Parameterized
1972
+ #
1973
+ # Provides the option to parameterize mailers in order to share instance variable
1974
+ # setup, processing, and common headers.
1975
+ #
1976
+ # Consider this example that does not use parameterization:
1977
+ #
1978
+ # class InvitationsMailer < ApplicationMailer
1979
+ # def account_invitation(inviter, invitee)
1980
+ # @account = inviter.account
1981
+ # @inviter = inviter
1982
+ # @invitee = invitee
1983
+ #
1984
+ # subject = "#{@inviter.name} invited you to their Basecamp (#{@account.name})"
1985
+ #
1986
+ # mail \
1987
+ # subject: subject,
1988
+ # to: invitee.email_address,
1989
+ # from: common_address(inviter),
1990
+ # reply_to: inviter.email_address_with_name
1991
+ # end
1992
+ #
1993
+ # def project_invitation(project, inviter, invitee)
1994
+ # @account = inviter.account
1995
+ # @project = project
1996
+ # @inviter = inviter
1997
+ # @invitee = invitee
1998
+ # @summarizer = ProjectInvitationSummarizer.new(@project.bucket)
1999
+ #
2000
+ # subject = "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})"
2001
+ #
2002
+ # mail \
2003
+ # subject: subject,
2004
+ # to: invitee.email_address,
2005
+ # from: common_address(inviter),
2006
+ # reply_to: inviter.email_address_with_name
2007
+ # end
2008
+ #
2009
+ # def bulk_project_invitation(projects, inviter, invitee)
2010
+ # @account = inviter.account
2011
+ # @projects = projects.sort_by(&:name)
2012
+ # @inviter = inviter
2013
+ # @invitee = invitee
2014
+ #
2015
+ # subject = "#{@inviter.name.familiar} added you to some new stuff in Basecamp (#{@account.name})"
2016
+ #
2017
+ # mail \
2018
+ # subject: subject,
2019
+ # to: invitee.email_address,
2020
+ # from: common_address(inviter),
2021
+ # reply_to: inviter.email_address_with_name
2022
+ # end
2023
+ # end
2024
+ #
2025
+ # InvitationsMailer.account_invitation(person_a, person_b).deliver_later
2026
+ #
2027
+ # Using parameterized mailers, this can be rewritten as:
2028
+ #
2029
+ # class InvitationsMailer < ApplicationMailer
2030
+ # before_action { @inviter, @invitee = params[:inviter], params[:invitee] }
2031
+ # before_action { @account = params[:inviter].account }
2032
+ #
2033
+ # default to: -> { @invitee.email_address },
2034
+ # from: -> { common_address(@inviter) },
2035
+ # reply_to: -> { @inviter.email_address_with_name }
2036
+ #
2037
+ # def account_invitation
2038
+ # mail subject: "#{@inviter.name} invited you to their Basecamp (#{@account.name})"
2039
+ # end
2040
+ #
2041
+ # def project_invitation
2042
+ # @project = params[:project]
2043
+ # @summarizer = ProjectInvitationSummarizer.new(@project.bucket)
2044
+ #
2045
+ # mail subject: "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})"
2046
+ # end
2047
+ #
2048
+ # def bulk_project_invitation
2049
+ # @projects = params[:projects].sort_by(&:name)
2050
+ #
2051
+ # mail subject: "#{@inviter.name.familiar} added you to some new stuff in Basecamp (#{@account.name})"
2052
+ # end
2053
+ # end
2054
+ #
2055
+ # InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later
2056
+ #
2057
+ # source://actionmailer//lib/action_mailer/parameterized.rb#89
2058
+ module ActionMailer::Parameterized
2059
+ extend ::ActiveSupport::Concern
2060
+
2061
+ mixes_in_class_methods ::ActionMailer::Parameterized::ClassMethods
2062
+ end
2063
+
2064
+ # source://actionmailer//lib/action_mailer/parameterized.rb#100
2065
+ module ActionMailer::Parameterized::ClassMethods
2066
+ # Provide the parameters to the mailer in order to use them in the instance methods and callbacks.
2067
+ #
2068
+ # InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later
2069
+ #
2070
+ # See Parameterized documentation for full example.
2071
+ #
2072
+ # source://actionmailer//lib/action_mailer/parameterized.rb#106
2073
+ def with(params); end
2074
+ end
2075
+
2076
+ # source://actionmailer//lib/action_mailer/parameterized.rb#111
2077
+ class ActionMailer::Parameterized::Mailer
2078
+ # @return [Mailer] a new instance of Mailer
2079
+ #
2080
+ # source://actionmailer//lib/action_mailer/parameterized.rb#112
2081
+ def initialize(mailer, params); end
2082
+
2083
+ private
2084
+
2085
+ # source://actionmailer//lib/action_mailer/parameterized.rb#117
2086
+ def method_missing(method_name, *_arg1, **_arg2, &_arg3); end
2087
+
2088
+ # @return [Boolean]
2089
+ #
2090
+ # source://actionmailer//lib/action_mailer/parameterized.rb#125
2091
+ def respond_to_missing?(method, include_all = T.unsafe(nil)); end
2092
+ end
2093
+
2094
+ # source://actionmailer//lib/action_mailer/parameterized.rb#130
2095
+ class ActionMailer::Parameterized::MessageDelivery < ::ActionMailer::MessageDelivery
2096
+ # @return [MessageDelivery] a new instance of MessageDelivery
2097
+ #
2098
+ # source://actionmailer//lib/action_mailer/parameterized.rb#131
2099
+ def initialize(mailer_class, action, params, *_arg3, **_arg4, &_arg5); end
2100
+
2101
+ private
2102
+
2103
+ # source://actionmailer//lib/action_mailer/parameterized.rb#144
2104
+ def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end
2105
+
2106
+ # source://actionmailer//lib/action_mailer/parameterized.rb#137
2107
+ def processed_mailer; end
2108
+ end
2109
+
2110
+ # source://actionmailer//lib/action_mailer/preview.rb#69
2111
+ class ActionMailer::Preview
2112
+ extend ::ActiveSupport::DescendantsTracker
2113
+
2114
+ # @return [Preview] a new instance of Preview
2115
+ #
2116
+ # source://actionmailer//lib/action_mailer/preview.rb#74
2117
+ def initialize(params = T.unsafe(nil)); end
2118
+
2119
+ # Returns the value of attribute params.
2120
+ #
2121
+ # source://actionmailer//lib/action_mailer/preview.rb#72
2122
+ def params; end
2123
+
2124
+ class << self
2125
+ # Returns all mailer preview classes.
2126
+ #
2127
+ # source://actionmailer//lib/action_mailer/preview.rb#80
2128
+ def all; end
2129
+
2130
+ # Returns the mail object for the given email name. The registered preview
2131
+ # interceptors will be informed so that they can transform the message
2132
+ # as they would if the mail was actually being delivered.
2133
+ #
2134
+ # source://actionmailer//lib/action_mailer/preview.rb#88
2135
+ def call(email, params = T.unsafe(nil)); end
2136
+
2137
+ # Returns +true+ if the email exists.
2138
+ #
2139
+ # @return [Boolean]
2140
+ #
2141
+ # source://actionmailer//lib/action_mailer/preview.rb#101
2142
+ def email_exists?(email); end
2143
+
2144
+ # Returns all of the available email previews.
2145
+ #
2146
+ # source://actionmailer//lib/action_mailer/preview.rb#96
2147
+ def emails; end
2148
+
2149
+ # Returns +true+ if the preview exists.
2150
+ #
2151
+ # @return [Boolean]
2152
+ #
2153
+ # source://actionmailer//lib/action_mailer/preview.rb#106
2154
+ def exists?(preview); end
2155
+
2156
+ # Find a mailer preview by its underscored class name.
2157
+ #
2158
+ # source://actionmailer//lib/action_mailer/preview.rb#111
2159
+ def find(preview); end
2160
+
2161
+ # Returns the underscored name of the mailer preview without the suffix.
2162
+ #
2163
+ # source://actionmailer//lib/action_mailer/preview.rb#116
2164
+ def preview_name; end
2165
+
2166
+ private
2167
+
2168
+ # source://actionmailer//lib/action_mailer/preview.rb#135
2169
+ def inform_preview_interceptors(message); end
2170
+
2171
+ # source://actionmailer//lib/action_mailer/preview.rb#121
2172
+ def load_previews; end
2173
+
2174
+ # source://actionmailer//lib/action_mailer/preview.rb#127
2175
+ def preview_paths; end
2176
+
2177
+ # source://actionmailer//lib/action_mailer/preview.rb#131
2178
+ def show_previews; end
2179
+ end
2180
+ end
2181
+
2182
+ # source://actionmailer//lib/action_mailer/preview.rb#6
2183
+ module ActionMailer::Previews
2184
+ extend ::ActiveSupport::Concern
2185
+
2186
+ mixes_in_class_methods ::ActionMailer::Previews::ClassMethods
2187
+ end
2188
+
2189
+ # source://actionmailer//lib/action_mailer/preview.rb#28
2190
+ module ActionMailer::Previews::ClassMethods
2191
+ # Register an Interceptor which will be called before mail is previewed.
2192
+ # Either a class or a string can be passed in as the Interceptor. If a
2193
+ # string is passed in it will be constantized.
2194
+ #
2195
+ # source://actionmailer//lib/action_mailer/preview.rb#42
2196
+ def register_preview_interceptor(interceptor); end
2197
+
2198
+ # Register one or more Interceptors which will be called before mail is previewed.
2199
+ #
2200
+ # source://actionmailer//lib/action_mailer/preview.rb#30
2201
+ def register_preview_interceptors(*interceptors); end
2202
+
2203
+ # Unregister a previously registered Interceptor.
2204
+ # Either a class or a string can be passed in as the Interceptor. If a
2205
+ # string is passed in it will be constantized.
2206
+ #
2207
+ # source://actionmailer//lib/action_mailer/preview.rb#53
2208
+ def unregister_preview_interceptor(interceptor); end
2209
+
2210
+ # Unregister one or more previously registered Interceptors.
2211
+ #
2212
+ # source://actionmailer//lib/action_mailer/preview.rb#35
2213
+ def unregister_preview_interceptors(*interceptors); end
2214
+
2215
+ private
2216
+
2217
+ # source://actionmailer//lib/action_mailer/preview.rb#58
2218
+ def interceptor_class_for(interceptor); end
2219
+ end
2220
+
2221
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#4
2222
+ module ActionMailer::QueuedDelivery
2223
+ extend ::ActiveSupport::Concern
2224
+ include GeneratedInstanceMethods
2225
+
2226
+ mixes_in_class_methods GeneratedClassMethods
2227
+
2228
+ module GeneratedClassMethods
2229
+ def deliver_later_queue_name; end
2230
+ def deliver_later_queue_name=(value); end
2231
+ def deliver_later_queue_name?; end
2232
+ def delivery_job; end
2233
+ def delivery_job=(value); end
2234
+ def delivery_job?; end
2235
+ end
2236
+
2237
+ module GeneratedInstanceMethods
2238
+ def deliver_later_queue_name; end
2239
+ def deliver_later_queue_name=(value); end
2240
+ def deliver_later_queue_name?; end
2241
+ def delivery_job; end
2242
+ def delivery_job=(value); end
2243
+ def delivery_job?; end
2244
+ end
2245
+ end
2246
+
2247
+ # source://actionmailer//lib/action_mailer/railtie.rb#9
2248
+ class ActionMailer::Railtie < ::Rails::Railtie; end
2249
+
2250
+ # = Action Mailer \Rescuable
2251
+ #
2252
+ # Provides
2253
+ # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]
2254
+ # for mailers. Wraps mailer action processing, mail job processing, and mail
2255
+ # delivery to handle configured errors.
2256
+ #
2257
+ # source://actionmailer//lib/action_mailer/rescuable.rb#10
2258
+ module ActionMailer::Rescuable
2259
+ extend ::ActiveSupport::Concern
2260
+ include GeneratedInstanceMethods
2261
+ include ::ActiveSupport::Rescuable
2262
+
2263
+ mixes_in_class_methods GeneratedClassMethods
2264
+ mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods
2265
+ mixes_in_class_methods ::ActionMailer::Rescuable::ClassMethods
2266
+
2267
+ # source://actionmailer//lib/action_mailer/rescuable.rb#20
2268
+ def handle_exceptions; end
2269
+
2270
+ private
2271
+
2272
+ # source://actionmailer//lib/action_mailer/rescuable.rb#27
2273
+ def process(*_arg0, **_arg1, &_arg2); end
2274
+
2275
+ module GeneratedClassMethods
2276
+ def rescue_handlers; end
2277
+ def rescue_handlers=(value); end
2278
+ def rescue_handlers?; end
2279
+ end
2280
+
2281
+ module GeneratedInstanceMethods
2282
+ def rescue_handlers; end
2283
+ def rescue_handlers=(value); end
2284
+ def rescue_handlers?; end
2285
+ end
2286
+ end
2287
+
2288
+ # source://actionmailer//lib/action_mailer/rescuable.rb#0
2289
+ module ActionMailer::Rescuable::ClassMethods
2290
+ # source://actionmailer//lib/action_mailer/rescuable.rb#15
2291
+ def handle_exception(exception); end
2292
+ end
2293
+
2294
+ # source://actionmailer//lib/action_mailer/test_case.rb#15
2295
+ class ActionMailer::TestCase < ::ActiveSupport::TestCase
2296
+ include ::ActiveSupport::Testing::ConstantLookup
2297
+ include ::ActiveJob::TestHelper
2298
+ include ::ActionMailer::TestHelper
2299
+ include ::Rails::Dom::Testing::Assertions::SelectorAssertions
2300
+ include ::Rails::Dom::Testing::Assertions::DomAssertions
2301
+ include ::ActionMailer::TestCase::Behavior
2302
+ extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods
2303
+ extend ::ActionMailer::TestCase::Behavior::ClassMethods
2304
+
2305
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2306
+ def _mailer_class; end
2307
+
2308
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2309
+ def _mailer_class=(_arg0); end
2310
+
2311
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2312
+ def _mailer_class?; end
2313
+
2314
+ class << self
2315
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
2316
+ def __callbacks; end
2317
+
2318
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2319
+ def _mailer_class; end
2320
+
2321
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2322
+ def _mailer_class=(value); end
2323
+
2324
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2325
+ def _mailer_class?; end
2326
+ end
2327
+ end
2328
+
2329
+ # source://actionmailer//lib/action_mailer/test_case.rb#32
2330
+ module ActionMailer::TestCase::Behavior
2331
+ include ::ActiveSupport::Testing::Assertions
2332
+ include ::ActiveJob::TestHelper
2333
+ include ::ActionMailer::TestHelper
2334
+ include ::Rails::Dom::Testing::Assertions::SelectorAssertions
2335
+ include ::Rails::Dom::Testing::Assertions::DomAssertions
2336
+ extend ::ActiveSupport::Concern
2337
+ include GeneratedInstanceMethods
2338
+ include ::ActiveSupport::Testing::ConstantLookup
2339
+
2340
+ mixes_in_class_methods GeneratedClassMethods
2341
+ mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods
2342
+ mixes_in_class_methods ::ActionMailer::TestCase::Behavior::ClassMethods
2343
+
2344
+ # Reads the fixture file for the given mailer.
2345
+ #
2346
+ # This is useful when testing mailers by being able to write the body of
2347
+ # an email inside a fixture. See the testing guide for a concrete example:
2348
+ # https://guides.rubyonrails.org/testing.html#revenge-of-the-fixtures
2349
+ #
2350
+ # source://actionmailer//lib/action_mailer/test_case.rb#82
2351
+ def read_fixture(action); end
2352
+
2353
+ private
2354
+
2355
+ # source://actionmailer//lib/action_mailer/test_case.rb#115
2356
+ def charset; end
2357
+
2358
+ # source://actionmailer//lib/action_mailer/test_case.rb#119
2359
+ def encode(subject); end
2360
+
2361
+ # source://actionmailer//lib/action_mailer/test_case.rb#87
2362
+ def initialize_test_deliveries; end
2363
+
2364
+ # source://actionmailer//lib/action_mailer/test_case.rb#104
2365
+ def restore_delivery_method; end
2366
+
2367
+ # source://actionmailer//lib/action_mailer/test_case.rb#94
2368
+ def restore_test_deliveries; end
2369
+
2370
+ # source://actionmailer//lib/action_mailer/test_case.rb#99
2371
+ def set_delivery_method(method); end
2372
+
2373
+ # source://actionmailer//lib/action_mailer/test_case.rb#109
2374
+ def set_expected_mail; end
2375
+
2376
+ module GeneratedClassMethods
2377
+ def _mailer_class; end
2378
+ def _mailer_class=(value); end
2379
+ def _mailer_class?; end
2380
+ end
2381
+
2382
+ module GeneratedInstanceMethods
2383
+ def _mailer_class; end
2384
+ def _mailer_class=(value); end
2385
+ def _mailer_class?; end
2386
+ end
2387
+ end
2388
+
2389
+ # source://actionmailer//lib/action_mailer/test_case.rb#48
2390
+ module ActionMailer::TestCase::Behavior::ClassMethods
2391
+ # @raise [NonInferrableMailerError]
2392
+ #
2393
+ # source://actionmailer//lib/action_mailer/test_case.rb#68
2394
+ def determine_default_mailer(name); end
2395
+
2396
+ # source://actionmailer//lib/action_mailer/test_case.rb#60
2397
+ def mailer_class; end
2398
+
2399
+ # source://actionmailer//lib/action_mailer/test_case.rb#49
2400
+ def tests(mailer); end
2401
+ end
2402
+
2403
+ # source://actionmailer//lib/action_mailer/test_case.rb#16
2404
+ module ActionMailer::TestCase::ClearTestDeliveries
2405
+ extend ::ActiveSupport::Concern
2406
+
2407
+ private
2408
+
2409
+ # source://actionmailer//lib/action_mailer/test_case.rb#25
2410
+ def clear_test_deliveries; end
2411
+ end
2412
+
2413
+ # Provides helper methods for testing Action Mailer, including #assert_emails
2414
+ # and #assert_no_emails.
2415
+ #
2416
+ # source://actionmailer//lib/action_mailer/test_helper.rb#9
2417
+ module ActionMailer::TestHelper
2418
+ include ::ActiveSupport::Testing::Assertions
2419
+ include ::ActiveJob::TestHelper
2420
+
2421
+ # Asserts that the number of emails sent matches the given number.
2422
+ #
2423
+ # def test_emails
2424
+ # assert_emails 0
2425
+ # ContactMailer.welcome.deliver_now
2426
+ # assert_emails 1
2427
+ # ContactMailer.welcome.deliver_now
2428
+ # assert_emails 2
2429
+ # end
2430
+ #
2431
+ # If a block is passed, that block should cause the specified number of
2432
+ # emails to be sent.
2433
+ #
2434
+ # def test_emails_again
2435
+ # assert_emails 1 do
2436
+ # ContactMailer.welcome.deliver_now
2437
+ # end
2438
+ #
2439
+ # assert_emails 2 do
2440
+ # ContactMailer.welcome.deliver_now
2441
+ # ContactMailer.welcome.deliver_later
2442
+ # end
2443
+ # end
2444
+ #
2445
+ # source://actionmailer//lib/action_mailer/test_helper.rb#35
2446
+ def assert_emails(number, &block); end
2447
+
2448
+ # Asserts that a specific email has been enqueued, optionally
2449
+ # matching arguments and/or params.
2450
+ #
2451
+ # def test_email
2452
+ # ContactMailer.welcome.deliver_later
2453
+ # assert_enqueued_email_with ContactMailer, :welcome
2454
+ # end
2455
+ #
2456
+ # def test_email_with_parameters
2457
+ # ContactMailer.with(greeting: "Hello").welcome.deliver_later
2458
+ # assert_enqueued_email_with ContactMailer, :welcome, args: { greeting: "Hello" }
2459
+ # end
2460
+ #
2461
+ # def test_email_with_arguments
2462
+ # ContactMailer.welcome("Hello", "Goodbye").deliver_later
2463
+ # assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
2464
+ # end
2465
+ #
2466
+ # def test_email_with_named_arguments
2467
+ # ContactMailer.welcome(greeting: "Hello", farewell: "Goodbye").deliver_later
2468
+ # assert_enqueued_email_with ContactMailer, :welcome, args: [{ greeting: "Hello", farewell: "Goodbye" }]
2469
+ # end
2470
+ #
2471
+ # def test_email_with_parameters_and_arguments
2472
+ # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later
2473
+ # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: ["Cheers", "Goodbye"]
2474
+ # end
2475
+ #
2476
+ # def test_email_with_parameters_and_named_arguments
2477
+ # ContactMailer.with(greeting: "Hello").welcome(farewell: "Goodbye").deliver_later
2478
+ # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: [{farewell: "Goodbye"}]
2479
+ # end
2480
+ #
2481
+ # def test_email_with_parameterized_mailer
2482
+ # ContactMailer.with(greeting: "Hello").welcome.deliver_later
2483
+ # assert_enqueued_email_with ContactMailer.with(greeting: "Hello"), :welcome
2484
+ # end
2485
+ #
2486
+ # def test_email_with_matchers
2487
+ # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later
2488
+ # assert_enqueued_email_with ContactMailer, :welcome,
2489
+ # params: ->(params) { /hello/i.match?(params[:greeting]) },
2490
+ # args: ->(args) { /cheers/i.match?(args[0]) }
2491
+ # end
2492
+ #
2493
+ # If a block is passed, that block should cause the specified email
2494
+ # to be enqueued.
2495
+ #
2496
+ # def test_email_in_block
2497
+ # assert_enqueued_email_with ContactMailer, :welcome do
2498
+ # ContactMailer.welcome.deliver_later
2499
+ # end
2500
+ # end
2501
+ #
2502
+ # If +args+ is provided as a Hash, a parameterized email is matched.
2503
+ #
2504
+ # def test_parameterized_email
2505
+ # assert_enqueued_email_with ContactMailer, :welcome,
2506
+ # args: {email: 'user@example.com'} do
2507
+ # ContactMailer.with(email: 'user@example.com').welcome.deliver_later
2508
+ # end
2509
+ # end
2510
+ #
2511
+ # source://actionmailer//lib/action_mailer/test_helper.rb#157
2512
+ def assert_enqueued_email_with(mailer, method, params: T.unsafe(nil), args: T.unsafe(nil), queue: T.unsafe(nil), &block); end
2513
+
2514
+ # Asserts that the number of emails enqueued for later delivery matches
2515
+ # the given number.
2516
+ #
2517
+ # def test_emails
2518
+ # assert_enqueued_emails 0
2519
+ # ContactMailer.welcome.deliver_later
2520
+ # assert_enqueued_emails 1
2521
+ # ContactMailer.welcome.deliver_later
2522
+ # assert_enqueued_emails 2
2523
+ # end
2524
+ #
2525
+ # If a block is passed, that block should cause the specified number of
2526
+ # emails to be enqueued.
2527
+ #
2528
+ # def test_emails_again
2529
+ # assert_enqueued_emails 1 do
2530
+ # ContactMailer.welcome.deliver_later
2531
+ # end
2532
+ #
2533
+ # assert_enqueued_emails 2 do
2534
+ # ContactMailer.welcome.deliver_later
2535
+ # ContactMailer.welcome.deliver_later
2536
+ # end
2537
+ # end
2538
+ #
2539
+ # source://actionmailer//lib/action_mailer/test_helper.rb#91
2540
+ def assert_enqueued_emails(number, &block); end
2541
+
2542
+ # Asserts that no emails have been sent.
2543
+ #
2544
+ # def test_emails
2545
+ # assert_no_emails
2546
+ # ContactMailer.welcome.deliver_now
2547
+ # assert_emails 1
2548
+ # end
2549
+ #
2550
+ # If a block is passed, that block should not cause any emails to be sent.
2551
+ #
2552
+ # def test_emails_again
2553
+ # assert_no_emails do
2554
+ # # No emails should be sent from this block
2555
+ # end
2556
+ # end
2557
+ #
2558
+ # Note: This assertion is simply a shortcut for:
2559
+ #
2560
+ # assert_emails 0, &block
2561
+ #
2562
+ # source://actionmailer//lib/action_mailer/test_helper.rb#63
2563
+ def assert_no_emails(&block); end
2564
+
2565
+ # Asserts that no emails are enqueued for later delivery.
2566
+ #
2567
+ # def test_no_emails
2568
+ # assert_no_enqueued_emails
2569
+ # ContactMailer.welcome.deliver_later
2570
+ # assert_enqueued_emails 1
2571
+ # end
2572
+ #
2573
+ # If a block is provided, it should not cause any emails to be enqueued.
2574
+ #
2575
+ # def test_no_emails
2576
+ # assert_no_enqueued_emails do
2577
+ # # No emails should be enqueued from this block
2578
+ # end
2579
+ # end
2580
+ #
2581
+ # source://actionmailer//lib/action_mailer/test_helper.rb#191
2582
+ def assert_no_enqueued_emails(&block); end
2583
+
2584
+ # Returns any emails that are sent in the block.
2585
+ #
2586
+ # def test_emails
2587
+ # emails = capture_emails do
2588
+ # ContactMailer.welcome.deliver_now
2589
+ # end
2590
+ # assert_equal "Hi there", emails.first.subject
2591
+ #
2592
+ # emails = capture_emails do
2593
+ # ContactMailer.welcome.deliver_now
2594
+ # ContactMailer.welcome.deliver_later
2595
+ # end
2596
+ # assert_equal "Hi there", emails.first.subject
2597
+ # end
2598
+ #
2599
+ # source://actionmailer//lib/action_mailer/test_helper.rb#249
2600
+ def capture_emails(&block); end
2601
+
2602
+ # Delivers all enqueued emails. If a block is given, delivers all of the emails
2603
+ # that were enqueued throughout the duration of the block. If a block is
2604
+ # not given, delivers all the enqueued emails up to this point in the test.
2605
+ #
2606
+ # def test_deliver_enqueued_emails
2607
+ # deliver_enqueued_emails do
2608
+ # ContactMailer.welcome.deliver_later
2609
+ # end
2610
+ #
2611
+ # assert_emails 1
2612
+ # end
2613
+ #
2614
+ # def test_deliver_enqueued_emails_without_block
2615
+ # ContactMailer.welcome.deliver_later
2616
+ #
2617
+ # deliver_enqueued_emails
2618
+ #
2619
+ # assert_emails 1
2620
+ # end
2621
+ #
2622
+ # If the +:queue+ option is specified,
2623
+ # then only the emails(s) enqueued to a specific queue will be performed.
2624
+ #
2625
+ # def test_deliver_enqueued_emails_with_queue
2626
+ # deliver_enqueued_emails queue: :external_mailers do
2627
+ # CustomerMailer.deliver_later_queue_name = :external_mailers
2628
+ # CustomerMailer.welcome.deliver_later # will be performed
2629
+ # EmployeeMailer.deliver_later_queue_name = :internal_mailers
2630
+ # EmployeeMailer.welcome.deliver_later # will not be performed
2631
+ # end
2632
+ #
2633
+ # assert_emails 1
2634
+ # end
2635
+ #
2636
+ # If the +:at+ option is specified, then only delivers emails enqueued to deliver
2637
+ # immediately or before the given time.
2638
+ #
2639
+ # source://actionmailer//lib/action_mailer/test_helper.rb#231
2640
+ def deliver_enqueued_emails(queue: T.unsafe(nil), at: T.unsafe(nil), &block); end
2641
+
2642
+ private
2643
+
2644
+ # source://actionmailer//lib/action_mailer/test_helper.rb#258
2645
+ def delivery_job_filter(job); end
2646
+ end
2647
+
2648
+ # source://actionmailer//lib/action_mailer/gem_version.rb#9
2649
+ module ActionMailer::VERSION; end
2650
+
2651
+ # source://actionmailer//lib/action_mailer/gem_version.rb#10
2652
+ ActionMailer::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
2653
+
2654
+ # source://actionmailer//lib/action_mailer/gem_version.rb#11
2655
+ ActionMailer::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
2656
+
2657
+ # source://actionmailer//lib/action_mailer/gem_version.rb#13
2658
+ ActionMailer::VERSION::PRE = T.let(T.unsafe(nil), T.untyped)
2659
+
2660
+ # source://actionmailer//lib/action_mailer/gem_version.rb#15
2661
+ ActionMailer::VERSION::STRING = T.let(T.unsafe(nil), String)
2662
+
2663
+ # source://actionmailer//lib/action_mailer/gem_version.rb#12
2664
+ ActionMailer::VERSION::TINY = T.let(T.unsafe(nil), Integer)