rails_type_id 0.1.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 (124) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +25 -0
  3. data/.ruby-version +1 -0
  4. data/README.md +46 -0
  5. data/Rakefile +16 -0
  6. data/lib/rails_type_id/concern.rb +129 -0
  7. data/lib/rails_type_id/require.rb +6 -0
  8. data/lib/rails_type_id/test_helper.rb +16 -0
  9. data/lib/rails_type_id/version.rb +6 -0
  10. data/lib/rails_type_id.rb +9 -0
  11. data/lib/tapioca/dsl/compilers/rails_type_id_compiler.rb +49 -0
  12. data/sig/rails_type_id.rbs +4 -0
  13. data/sorbet/config +4 -0
  14. data/sorbet/rbi/annotations/.gitattributes +1 -0
  15. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  16. data/sorbet/rbi/annotations/actionpack.rbi +430 -0
  17. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  18. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  19. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  20. data/sorbet/rbi/annotations/activerecord.rbi +98 -0
  21. data/sorbet/rbi/annotations/activesupport.rbi +468 -0
  22. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  23. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  24. data/sorbet/rbi/annotations/railties.rbi +61 -0
  25. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  26. data/sorbet/rbi/dsl/.gitattributes +1 -0
  27. data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +21 -0
  28. data/sorbet/rbi/dsl/active_model/validations.rbi +26 -0
  29. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  30. data/sorbet/rbi/dsl/rails_type_id/concern.rbi +22 -0
  31. data/sorbet/rbi/gems/.gitattributes +1 -0
  32. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +3133 -0
  33. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +991 -0
  34. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +2775 -0
  35. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +21167 -0
  36. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +1449 -0
  37. data/sorbet/rbi/gems/actionview@8.0.2.rbi +15789 -0
  38. data/sorbet/rbi/gems/activejob@8.0.2.rbi +2864 -0
  39. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +6946 -0
  40. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +42458 -0
  41. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +2156 -0
  42. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +21274 -0
  43. data/sorbet/rbi/gems/ast@2.4.3.rbi +586 -0
  44. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  45. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  46. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +275 -0
  47. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  48. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11734 -0
  49. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
  50. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  51. data/sorbet/rbi/gems/date@3.4.1.rbi +403 -0
  52. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  53. data/sorbet/rbi/gems/erb@5.0.2.rbi +878 -0
  54. data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
  55. data/sorbet/rbi/gems/globalid@1.2.1.rbi +742 -0
  56. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2383 -0
  57. data/sorbet/rbi/gems/io-console@0.8.1.rbi +9 -0
  58. data/sorbet/rbi/gems/json@2.12.2.rbi +2287 -0
  59. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  60. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +323 -0
  61. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  62. data/sorbet/rbi/gems/loofah@2.24.1.rbi +1105 -0
  63. data/sorbet/rbi/gems/mail@2.8.1.rbi +8890 -0
  64. data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
  65. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
  66. data/sorbet/rbi/gems/minitest@5.25.5.rbi +2231 -0
  67. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +10285 -0
  68. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
  69. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  70. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +1240 -0
  71. data/sorbet/rbi/gems/netrc@0.11.0.rbi +177 -0
  72. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +388 -0
  73. data/sorbet/rbi/gems/nokogiri@1.18.9.rbi +8548 -0
  74. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  75. data/sorbet/rbi/gems/parser@3.3.9.0.rbi +5537 -0
  76. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  77. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  78. data/sorbet/rbi/gems/prism@1.4.0.rbi +41790 -0
  79. data/sorbet/rbi/gems/psych@5.2.6.rbi +2542 -0
  80. data/sorbet/rbi/gems/racc@1.8.1.rbi +168 -0
  81. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +722 -0
  82. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +729 -0
  83. data/sorbet/rbi/gems/rack@3.2.0.rbi +5054 -0
  84. data/sorbet/rbi/gems/rackup@2.2.1.rbi +230 -0
  85. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +790 -0
  86. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +645 -0
  87. data/sorbet/rbi/gems/rails@8.0.2.rbi +9 -0
  88. data/sorbet/rbi/gems/railties@8.0.2.rbi +4014 -0
  89. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  90. data/sorbet/rbi/gems/rake@13.3.0.rbi +3039 -0
  91. data/sorbet/rbi/gems/rbi@0.3.6.rbi +5162 -0
  92. data/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi +7895 -0
  93. data/sorbet/rbi/gems/rdoc@6.14.2.rbi +12944 -0
  94. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3833 -0
  95. data/sorbet/rbi/gems/reline@0.6.2.rbi +9 -0
  96. data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
  97. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5205 -0
  98. data/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi +7473 -0
  99. data/sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi +2386 -0
  100. data/sorbet/rbi/gems/rubocop@1.79.1.rbi +63674 -0
  101. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  102. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  103. data/sorbet/rbi/gems/spoom@1.7.5.rbi +5832 -0
  104. data/sorbet/rbi/gems/sqlite3@2.7.3.rbi +1989 -0
  105. data/sorbet/rbi/gems/stringio@3.1.7.rbi +9 -0
  106. data/sorbet/rbi/gems/tapioca@0.17.7.rbi +3692 -0
  107. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  108. data/sorbet/rbi/gems/timeout@0.4.3.rbi +157 -0
  109. data/sorbet/rbi/gems/typeid@0.2.2.rbi +239 -0
  110. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5919 -0
  111. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  112. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  113. data/sorbet/rbi/gems/uri@1.0.3.rbi +2354 -0
  114. data/sorbet/rbi/gems/useragent@0.16.11.rbi +9 -0
  115. data/sorbet/rbi/gems/uuid7@0.2.0.rbi +60 -0
  116. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +1065 -0
  117. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +117 -0
  118. data/sorbet/rbi/gems/with_model@2.2.0.rbi +282 -0
  119. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +430 -0
  120. data/sorbet/rbi/gems/yard@0.9.37.rbi +18512 -0
  121. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1196 -0
  122. data/sorbet/tapioca/config.yml +13 -0
  123. data/sorbet/tapioca/require.rb +13 -0
  124. metadata +208 -0
@@ -0,0 +1,2775 @@
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#638
544
+ def initialize; end
545
+
546
+ # source://actionmailer//lib/action_mailer/base.rb#477
547
+ def __callbacks; end
548
+
549
+ # source://actionmailer//lib/action_mailer/base.rb#477
550
+ def _deliver_callbacks; end
551
+
552
+ # source://actionmailer//lib/action_mailer/base.rb#490
553
+ def _helper_methods; end
554
+
555
+ # source://actionmailer//lib/action_mailer/base.rb#490
556
+ def _helper_methods=(_arg0); end
557
+
558
+ # source://actionmailer//lib/action_mailer/base.rb#490
559
+ def _helper_methods?; end
560
+
561
+ # source://actionmailer//lib/action_mailer/base.rb#496
562
+ def _layout_conditions; end
563
+
564
+ # source://actionmailer//lib/action_mailer/base.rb#496
565
+ def _layout_conditions?; end
566
+
567
+ # source://actionmailer//lib/action_mailer/base.rb#493
568
+ def _process_action_callbacks; end
569
+
570
+ # source://actionmailer//lib/action_mailer/base.rb#477
571
+ def _run_deliver_callbacks(&block); end
572
+
573
+ # source://actionmailer//lib/action_mailer/base.rb#493
574
+ def _run_process_action_callbacks(&block); end
575
+
576
+ # source://actionmailer//lib/action_mailer/base.rb#494
577
+ def _view_cache_dependencies; end
578
+
579
+ # source://actionmailer//lib/action_mailer/base.rb#494
580
+ def _view_cache_dependencies=(_arg0); end
581
+
582
+ # source://actionmailer//lib/action_mailer/base.rb#494
583
+ def _view_cache_dependencies?; end
584
+
585
+ # source://actionmailer//lib/action_mailer/base.rb#492
586
+ def asset_host; end
587
+
588
+ # source://actionmailer//lib/action_mailer/base.rb#492
589
+ def asset_host=(value); end
590
+
591
+ # source://actionmailer//lib/action_mailer/base.rb#492
592
+ def assets_dir; end
593
+
594
+ # source://actionmailer//lib/action_mailer/base.rb#492
595
+ def assets_dir=(value); end
596
+
597
+ # Allows you to add attachments to an email, like so:
598
+ #
599
+ # mail.attachments['filename.jpg'] = File.read('/path/to/filename.jpg')
600
+ #
601
+ # If you do this, then Mail will take the file name and work out the mime type.
602
+ # It will also set the +Content-Type+, +Content-Disposition+, and +Content-Transfer-Encoding+,
603
+ # and encode the contents of the attachment in Base64.
604
+ #
605
+ # You can also specify overrides if you want by passing a hash instead of a string:
606
+ #
607
+ # mail.attachments['filename.jpg'] = {mime_type: 'application/gzip',
608
+ # content: File.read('/path/to/filename.jpg')}
609
+ #
610
+ # If you want to use encoding other than Base64 then you will need to pass encoding
611
+ # type along with the pre-encoded content as Mail doesn't know how to decode the
612
+ # data:
613
+ #
614
+ # file_content = SpecialEncode(File.read('/path/to/filename.jpg'))
615
+ # mail.attachments['filename.jpg'] = {mime_type: 'application/gzip',
616
+ # content: file_content }
617
+ #
618
+ # You can also search for specific attachments:
619
+ #
620
+ # # By Filename
621
+ # mail.attachments['filename.jpg'] # => Mail::Part object or nil
622
+ #
623
+ # # or by index
624
+ # mail.attachments[0] # => Mail::Part (first attachment)
625
+ #
626
+ # source://actionmailer//lib/action_mailer/base.rb#755
627
+ def attachments; end
628
+
629
+ # source://actionmailer//lib/action_mailer/base.rb#492
630
+ def default_asset_host_protocol; end
631
+
632
+ # source://actionmailer//lib/action_mailer/base.rb#492
633
+ def default_asset_host_protocol=(value); end
634
+
635
+ # source://actionmailer//lib/action_mailer/base.rb#502
636
+ def default_params; end
637
+
638
+ # source://actionmailer//lib/action_mailer/base.rb#502
639
+ def default_params=(_arg0); end
640
+
641
+ # source://actionmailer//lib/action_mailer/base.rb#502
642
+ def default_params?; end
643
+
644
+ # source://actionmailer//lib/action_mailer/base.rb#494
645
+ def default_static_extension; end
646
+
647
+ # source://actionmailer//lib/action_mailer/base.rb#494
648
+ def default_static_extension=(value); end
649
+
650
+ # source://actionmailer//lib/action_mailer/base.rb#479
651
+ def deliver_later_queue_name; end
652
+
653
+ # source://actionmailer//lib/action_mailer/base.rb#479
654
+ def deliver_later_queue_name=(_arg0); end
655
+
656
+ # source://actionmailer//lib/action_mailer/base.rb#479
657
+ def deliver_later_queue_name?; end
658
+
659
+ # source://actionmailer//lib/action_mailer/base.rb#479
660
+ def delivery_job; end
661
+
662
+ # source://actionmailer//lib/action_mailer/base.rb#479
663
+ def delivery_job=(_arg0); end
664
+
665
+ # source://actionmailer//lib/action_mailer/base.rb#479
666
+ def delivery_job?; end
667
+
668
+ # source://actionmailer//lib/action_mailer/base.rb#478
669
+ def delivery_method; end
670
+
671
+ # source://actionmailer//lib/action_mailer/base.rb#478
672
+ def delivery_method=(_arg0); end
673
+
674
+ # source://actionmailer//lib/action_mailer/base.rb#478
675
+ def delivery_method?; end
676
+
677
+ # source://actionmailer//lib/action_mailer/base.rb#478
678
+ def delivery_methods; end
679
+
680
+ # source://actionmailer//lib/action_mailer/base.rb#478
681
+ def delivery_methods=(_arg0); end
682
+
683
+ # source://actionmailer//lib/action_mailer/base.rb#478
684
+ def delivery_methods?; end
685
+
686
+ # Returns an email in the format "Name <email@example.com>".
687
+ #
688
+ # If the name is a blank string, it returns just the address.
689
+ #
690
+ # source://actionmailer//lib/action_mailer/base.rb#679
691
+ def email_address_with_name(address, name); end
692
+
693
+ # source://actionmailer//lib/action_mailer/base.rb#494
694
+ def enable_fragment_cache_logging; end
695
+
696
+ # source://actionmailer//lib/action_mailer/base.rb#494
697
+ def enable_fragment_cache_logging=(value); end
698
+
699
+ # source://actionmailer//lib/action_mailer/base.rb#478
700
+ def file_settings; end
701
+
702
+ # source://actionmailer//lib/action_mailer/base.rb#478
703
+ def file_settings=(_arg0); end
704
+
705
+ # source://actionmailer//lib/action_mailer/base.rb#478
706
+ def file_settings?; end
707
+
708
+ # source://actionmailer//lib/action_mailer/base.rb#494
709
+ def fragment_cache_keys; end
710
+
711
+ # source://actionmailer//lib/action_mailer/base.rb#494
712
+ def fragment_cache_keys=(_arg0); end
713
+
714
+ # source://actionmailer//lib/action_mailer/base.rb#494
715
+ def fragment_cache_keys?; end
716
+
717
+ # Allows you to pass random and unusual headers to the new +Mail::Message+
718
+ # object which will add them to itself.
719
+ #
720
+ # headers['X-Special-Domain-Specific-Header'] = "SecretValue"
721
+ #
722
+ # You can also pass a hash into headers of header field names and values,
723
+ # which will then be set on the +Mail::Message+ object:
724
+ #
725
+ # headers 'X-Special-Domain-Specific-Header' => "SecretValue",
726
+ # 'In-Reply-To' => incoming.message_id
727
+ #
728
+ # The resulting +Mail::Message+ will have the following in its header:
729
+ #
730
+ # X-Special-Domain-Specific-Header: SecretValue
731
+ #
732
+ # Note about replacing already defined headers:
733
+ #
734
+ # * +subject+
735
+ # * +sender+
736
+ # * +from+
737
+ # * +to+
738
+ # * +cc+
739
+ # * +bcc+
740
+ # * +reply-to+
741
+ # * +orig-date+
742
+ # * +message-id+
743
+ # * +references+
744
+ #
745
+ # Fields can only appear once in email headers while other fields such as
746
+ # <tt>X-Anything</tt> can appear multiple times.
747
+ #
748
+ # If you want to replace any header which already exists, first set it to
749
+ # +nil+ in order to reset the value otherwise another field will be added
750
+ # for the same header.
751
+ #
752
+ # source://actionmailer//lib/action_mailer/base.rb#717
753
+ def headers(args = T.unsafe(nil)); end
754
+
755
+ # source://actionmailer//lib/action_mailer/base.rb#492
756
+ def javascripts_dir; end
757
+
758
+ # source://actionmailer//lib/action_mailer/base.rb#492
759
+ def javascripts_dir=(value); end
760
+
761
+ # source://actionmailer//lib/action_mailer/base.rb#489
762
+ def logger; end
763
+
764
+ # source://actionmailer//lib/action_mailer/base.rb#489
765
+ def logger=(value); end
766
+
767
+ # The main method that creates the message and renders the email templates. There are
768
+ # two ways to call this method, with a block, or without a block.
769
+ #
770
+ # It accepts a headers hash. This hash allows you to specify
771
+ # the most used headers in an email message, these are:
772
+ #
773
+ # * +:subject+ - The subject of the message, if this is omitted, Action Mailer will
774
+ # ask the \Rails I18n class for a translated +:subject+ in the scope of
775
+ # <tt>[mailer_scope, action_name]</tt> or if this is missing, will translate the
776
+ # humanized version of the +action_name+
777
+ # * +:to+ - Who the message is destined for, can be a string of addresses, or an array
778
+ # of addresses.
779
+ # * +:from+ - Who the message is from
780
+ # * +:cc+ - Who you would like to Carbon-Copy on this email, can be a string of addresses,
781
+ # or an array of addresses.
782
+ # * +:bcc+ - Who you would like to Blind-Carbon-Copy on this email, can be a string of
783
+ # addresses, or an array of addresses.
784
+ # * +:reply_to+ - Who to set the +Reply-To+ header of the email to.
785
+ # * +:date+ - The date to say the email was sent on.
786
+ #
787
+ # You can set default values for any of the above headers (except +:date+)
788
+ # by using the ::default class method:
789
+ #
790
+ # class Notifier < ActionMailer::Base
791
+ # default from: 'no-reply@test.lindsaar.net',
792
+ # bcc: 'email_logger@test.lindsaar.net',
793
+ # reply_to: 'bounces@test.lindsaar.net'
794
+ # end
795
+ #
796
+ # If you need other headers not listed above, you can either pass them in
797
+ # as part of the headers hash or use the <tt>headers['name'] = value</tt>
798
+ # method.
799
+ #
800
+ # When a +:return_path+ is specified as header, that value will be used as
801
+ # the 'envelope from' address for the Mail message. Setting this is useful
802
+ # when you want delivery notifications sent to a different address than the
803
+ # one in +:from+. Mail will actually use the +:return_path+ in preference
804
+ # to the +:sender+ in preference to the +:from+ field for the 'envelope
805
+ # from' value.
806
+ #
807
+ # If you do not pass a block to the +mail+ method, it will find all
808
+ # templates in the view paths using by default the mailer name and the
809
+ # method name that it is being called from, it will then create parts for
810
+ # each of these templates intelligently, making educated guesses on correct
811
+ # content type and sequence, and return a fully prepared +Mail::Message+
812
+ # ready to call <tt>:deliver</tt> on to send.
813
+ #
814
+ # For example:
815
+ #
816
+ # class Notifier < ActionMailer::Base
817
+ # default from: 'no-reply@test.lindsaar.net'
818
+ #
819
+ # def welcome
820
+ # mail(to: 'mikel@test.lindsaar.net')
821
+ # end
822
+ # end
823
+ #
824
+ # Will look for all templates at "app/views/notifier" with name "welcome".
825
+ # If no welcome template exists, it will raise an ActionView::MissingTemplate error.
826
+ #
827
+ # However, those can be customized:
828
+ #
829
+ # mail(template_path: 'notifications', template_name: 'another')
830
+ #
831
+ # And now it will look for all templates at "app/views/notifications" with name "another".
832
+ #
833
+ # If you do pass a block, you can render specific templates of your choice:
834
+ #
835
+ # mail(to: 'mikel@test.lindsaar.net') do |format|
836
+ # format.text
837
+ # format.html
838
+ # end
839
+ #
840
+ # You can even render plain text directly without using a template:
841
+ #
842
+ # mail(to: 'mikel@test.lindsaar.net') do |format|
843
+ # format.text { render plain: "Hello Mikel!" }
844
+ # format.html { render html: "<h1>Hello Mikel!</h1>".html_safe }
845
+ # end
846
+ #
847
+ # Which will render a +multipart/alternative+ email with +text/plain+ and
848
+ # +text/html+ parts.
849
+ #
850
+ # The block syntax also allows you to customize the part headers if desired:
851
+ #
852
+ # mail(to: 'mikel@test.lindsaar.net') do |format|
853
+ # format.html
854
+ # end
855
+ #
856
+ # source://actionmailer//lib/action_mailer/base.rb#864
857
+ def mail(headers = T.unsafe(nil), &block); end
858
+
859
+ # Returns the name of the mailer object.
860
+ #
861
+ # source://actionmailer//lib/action_mailer/base.rb#672
862
+ def mailer_name; end
863
+
864
+ # source://actionmailer//lib/action_mailer/base.rb#636
865
+ def message; end
866
+
867
+ # source://actionmailer//lib/action_mailer/base.rb#636
868
+ def message=(_arg0); end
869
+
870
+ # source://actionmailer//lib/action_mailer/base.rb#481
871
+ def params; end
872
+
873
+ # source://actionmailer//lib/action_mailer/base.rb#481
874
+ def params=(_arg0); end
875
+
876
+ # source://actionmailer//lib/action_mailer/base.rb#494
877
+ def perform_caching; end
878
+
879
+ # source://actionmailer//lib/action_mailer/base.rb#494
880
+ def perform_caching=(value); end
881
+
882
+ # source://actionmailer//lib/action_mailer/base.rb#478
883
+ def perform_deliveries; end
884
+
885
+ # source://actionmailer//lib/action_mailer/base.rb#478
886
+ def perform_deliveries=(val); end
887
+
888
+ # source://actionmailer//lib/action_mailer/base.rb#482
889
+ def preview_interceptors; end
890
+
891
+ # source://actionmailer//lib/action_mailer/base.rb#482
892
+ def preview_paths; end
893
+
894
+ # source://actionmailer//lib/action_mailer/base.rb#644
895
+ def process(method_name, *args, **_arg2); end
896
+
897
+ # source://actionmailer//lib/action_mailer/base.rb#478
898
+ def raise_delivery_errors; end
899
+
900
+ # source://actionmailer//lib/action_mailer/base.rb#478
901
+ def raise_delivery_errors=(val); end
902
+
903
+ # source://actionmailer//lib/action_mailer/base.rb#493
904
+ def raise_on_missing_callback_actions; end
905
+
906
+ # source://actionmailer//lib/action_mailer/base.rb#493
907
+ def raise_on_missing_callback_actions=(val); end
908
+
909
+ # source://actionmailer//lib/action_mailer/base.rb#492
910
+ def relative_url_root; end
911
+
912
+ # source://actionmailer//lib/action_mailer/base.rb#492
913
+ def relative_url_root=(value); end
914
+
915
+ # source://actionmailer//lib/action_mailer/base.rb#480
916
+ def rescue_handlers; end
917
+
918
+ # source://actionmailer//lib/action_mailer/base.rb#480
919
+ def rescue_handlers=(_arg0); end
920
+
921
+ # source://actionmailer//lib/action_mailer/base.rb#480
922
+ def rescue_handlers?; end
923
+
924
+ # source://actionmailer//lib/action_mailer/base.rb#478
925
+ def sendmail_settings; end
926
+
927
+ # source://actionmailer//lib/action_mailer/base.rb#478
928
+ def sendmail_settings=(_arg0); end
929
+
930
+ # source://actionmailer//lib/action_mailer/base.rb#478
931
+ def sendmail_settings?; end
932
+
933
+ # source://actionmailer//lib/action_mailer/base.rb#482
934
+ def show_previews; end
935
+
936
+ # source://actionmailer//lib/action_mailer/base.rb#478
937
+ def smtp_settings; end
938
+
939
+ # source://actionmailer//lib/action_mailer/base.rb#478
940
+ def smtp_settings=(_arg0); end
941
+
942
+ # source://actionmailer//lib/action_mailer/base.rb#478
943
+ def smtp_settings?; end
944
+
945
+ # source://actionmailer//lib/action_mailer/base.rb#492
946
+ def stylesheets_dir; end
947
+
948
+ # source://actionmailer//lib/action_mailer/base.rb#492
949
+ def stylesheets_dir=(value); end
950
+
951
+ # source://actionmailer//lib/action_mailer/base.rb#478
952
+ def test_settings; end
953
+
954
+ # source://actionmailer//lib/action_mailer/base.rb#478
955
+ def test_settings=(_arg0); end
956
+
957
+ # source://actionmailer//lib/action_mailer/base.rb#478
958
+ def test_settings?; end
959
+
960
+ private
961
+
962
+ # source://actionmailer//lib/action_mailer/base.rb#496
963
+ def _layout(lookup_context, formats, keys); end
964
+
965
+ # source://actionmailer//lib/action_mailer/base.rb#1065
966
+ def _protected_ivars; end
967
+
968
+ # source://actionmailer//lib/action_mailer/base.rb#941
969
+ def apply_defaults(headers); end
970
+
971
+ # source://actionmailer//lib/action_mailer/base.rb#961
972
+ def assign_headers_to_message(message, headers); end
973
+
974
+ # source://actionmailer//lib/action_mailer/base.rb#967
975
+ def collect_responses(headers, &block); end
976
+
977
+ # @yield [collector]
978
+ #
979
+ # source://actionmailer//lib/action_mailer/base.rb#977
980
+ def collect_responses_from_block(headers); end
981
+
982
+ # source://actionmailer//lib/action_mailer/base.rb#991
983
+ def collect_responses_from_templates(headers); end
984
+
985
+ # source://actionmailer//lib/action_mailer/base.rb#984
986
+ def collect_responses_from_text(headers); end
987
+
988
+ # source://actionmailer//lib/action_mailer/base.rb#951
989
+ def compute_default(value); end
990
+
991
+ # source://actionmailer//lib/action_mailer/base.rb#1034
992
+ def create_parts_from_responses(m, responses); end
993
+
994
+ # Translates the +subject+ using \Rails I18n class under <tt>[mailer_scope, action_name]</tt> scope.
995
+ # If it does not find a translation for the +subject+ under the specified scope it will default to a
996
+ # humanized version of the <tt>action_name</tt>.
997
+ # If the subject has interpolations, you can pass them through the +interpolations+ parameter.
998
+ #
999
+ # source://actionmailer//lib/action_mailer/base.rb#931
1000
+ def default_i18n_subject(interpolations = T.unsafe(nil)); end
1001
+
1002
+ # source://actionmailer//lib/action_mailer/base.rb#1004
1003
+ def each_template(paths, name, &block); end
1004
+
1005
+ # source://actionmailer//lib/action_mailer/base.rb#1047
1006
+ def insert_part(container, response, charset); end
1007
+
1008
+ # source://actionmailer//lib/action_mailer/base.rb#1061
1009
+ def instrument_name; end
1010
+
1011
+ # This and #instrument_name is for caching instrument
1012
+ #
1013
+ # source://actionmailer//lib/action_mailer/base.rb#1054
1014
+ def instrument_payload(key); end
1015
+
1016
+ # Used by #mail to set the content type of the message.
1017
+ #
1018
+ # It will use the given +user_content_type+, or multipart if the mail
1019
+ # message has any attachments. If the attachments are inline, the content
1020
+ # type will be "multipart/related", otherwise "multipart/mixed".
1021
+ #
1022
+ # If there is no content type passed in via headers, and there are no
1023
+ # attachments, or the message is multipart, then the default content type is
1024
+ # used.
1025
+ #
1026
+ # source://actionmailer//lib/action_mailer/base.rb#909
1027
+ def set_content_type(m, user_content_type, class_default); end
1028
+
1029
+ # source://actionmailer//lib/action_mailer/base.rb#1013
1030
+ def wrap_inline_attachments(message); end
1031
+
1032
+ class << self
1033
+ # source://actionmailer//lib/action_mailer/base.rb#477
1034
+ def __callbacks; end
1035
+
1036
+ # source://actionmailer//lib/action_mailer/base.rb#477
1037
+ def __callbacks=(value); end
1038
+
1039
+ # source://actionmailer//lib/action_mailer/base.rb#483
1040
+ def _default_form_builder; end
1041
+
1042
+ # source://actionmailer//lib/action_mailer/base.rb#483
1043
+ def _default_form_builder=(value); end
1044
+
1045
+ # source://actionmailer//lib/action_mailer/base.rb#483
1046
+ def _default_form_builder?; end
1047
+
1048
+ # source://actionmailer//lib/action_mailer/base.rb#477
1049
+ def _deliver_callbacks; end
1050
+
1051
+ # source://actionmailer//lib/action_mailer/base.rb#477
1052
+ def _deliver_callbacks=(value); end
1053
+
1054
+ # source://actionmailer//lib/action_mailer/base.rb#490
1055
+ def _helper_methods; end
1056
+
1057
+ # source://actionmailer//lib/action_mailer/base.rb#490
1058
+ def _helper_methods=(value); end
1059
+
1060
+ # source://actionmailer//lib/action_mailer/base.rb#490
1061
+ def _helper_methods?; end
1062
+
1063
+ # source://actionmailer//lib/action_mailer/base.rb#490
1064
+ def _helpers; end
1065
+
1066
+ # source://actionmailer//lib/action_mailer/base.rb#496
1067
+ def _layout; end
1068
+
1069
+ # source://actionmailer//lib/action_mailer/base.rb#496
1070
+ def _layout=(value); end
1071
+
1072
+ # source://actionmailer//lib/action_mailer/base.rb#496
1073
+ def _layout?; end
1074
+
1075
+ # source://actionmailer//lib/action_mailer/base.rb#496
1076
+ def _layout_conditions; end
1077
+
1078
+ # source://actionmailer//lib/action_mailer/base.rb#496
1079
+ def _layout_conditions=(value); end
1080
+
1081
+ # source://actionmailer//lib/action_mailer/base.rb#496
1082
+ def _layout_conditions?; end
1083
+
1084
+ # source://actionmailer//lib/action_mailer/base.rb#493
1085
+ def _process_action_callbacks; end
1086
+
1087
+ # source://actionmailer//lib/action_mailer/base.rb#493
1088
+ def _process_action_callbacks=(value); end
1089
+
1090
+ # source://actionmailer//lib/action_mailer/base.rb#494
1091
+ def _view_cache_dependencies; end
1092
+
1093
+ # source://actionmailer//lib/action_mailer/base.rb#494
1094
+ def _view_cache_dependencies=(value); end
1095
+
1096
+ # source://actionmailer//lib/action_mailer/base.rb#494
1097
+ def _view_cache_dependencies?; end
1098
+
1099
+ # source://actionmailer//lib/action_mailer/base.rb#492
1100
+ def asset_host; end
1101
+
1102
+ # source://actionmailer//lib/action_mailer/base.rb#492
1103
+ def asset_host=(value); end
1104
+
1105
+ # source://actionmailer//lib/action_mailer/base.rb#492
1106
+ def assets_dir; end
1107
+
1108
+ # source://actionmailer//lib/action_mailer/base.rb#492
1109
+ def assets_dir=(value); end
1110
+
1111
+ # Returns the name of the current mailer. This method is also being used as a path for a view lookup.
1112
+ # If this is an anonymous mailer, this method will return +anonymous+ instead.
1113
+ #
1114
+ # source://actionmailer//lib/action_mailer/base.rb#575
1115
+ def controller_path; end
1116
+
1117
+ # Allows to set defaults through app configuration:
1118
+ #
1119
+ # config.action_mailer.default_options = { from: "no-reply@example.org" }
1120
+ #
1121
+ # source://actionmailer//lib/action_mailer/base.rb#580
1122
+ def default(value = T.unsafe(nil)); end
1123
+
1124
+ # source://actionmailer//lib/action_mailer/base.rb#492
1125
+ def default_asset_host_protocol; end
1126
+
1127
+ # source://actionmailer//lib/action_mailer/base.rb#492
1128
+ def default_asset_host_protocol=(value); end
1129
+
1130
+ # Allows to set defaults through app configuration:
1131
+ #
1132
+ # config.action_mailer.default_options = { from: "no-reply@example.org" }
1133
+ #
1134
+ # source://actionmailer//lib/action_mailer/base.rb#584
1135
+ def default_options=(value = T.unsafe(nil)); end
1136
+
1137
+ # source://actionmailer//lib/action_mailer/base.rb#502
1138
+ def default_params; end
1139
+
1140
+ # source://actionmailer//lib/action_mailer/base.rb#502
1141
+ def default_params=(value); end
1142
+
1143
+ # source://actionmailer//lib/action_mailer/base.rb#502
1144
+ def default_params?; end
1145
+
1146
+ # source://actionmailer//lib/action_mailer/base.rb#494
1147
+ def default_static_extension; end
1148
+
1149
+ # source://actionmailer//lib/action_mailer/base.rb#494
1150
+ def default_static_extension=(value); end
1151
+
1152
+ # source://actionmailer//lib/action_mailer/base.rb#479
1153
+ def deliver_later_queue_name; end
1154
+
1155
+ # source://actionmailer//lib/action_mailer/base.rb#479
1156
+ def deliver_later_queue_name=(value); end
1157
+
1158
+ # source://actionmailer//lib/action_mailer/base.rb#479
1159
+ def deliver_later_queue_name?; end
1160
+
1161
+ # Wraps an email delivery inside of ActiveSupport::Notifications instrumentation.
1162
+ #
1163
+ # This method is actually called by the +Mail::Message+ object itself
1164
+ # through a callback when you call <tt>:deliver</tt> on the +Mail::Message+,
1165
+ # calling +deliver_mail+ directly and passing a +Mail::Message+ will do
1166
+ # nothing except tell the logger you sent the email.
1167
+ #
1168
+ # source://actionmailer//lib/action_mailer/base.rb#592
1169
+ def deliver_mail(mail); end
1170
+
1171
+ # source://actionmailer//lib/action_mailer/base.rb#479
1172
+ def delivery_job; end
1173
+
1174
+ # source://actionmailer//lib/action_mailer/base.rb#479
1175
+ def delivery_job=(value); end
1176
+
1177
+ # source://actionmailer//lib/action_mailer/base.rb#479
1178
+ def delivery_job?; end
1179
+
1180
+ # source://actionmailer//lib/action_mailer/base.rb#478
1181
+ def delivery_method; end
1182
+
1183
+ # source://actionmailer//lib/action_mailer/base.rb#478
1184
+ def delivery_method=(value); end
1185
+
1186
+ # source://actionmailer//lib/action_mailer/base.rb#478
1187
+ def delivery_method?; end
1188
+
1189
+ # source://actionmailer//lib/action_mailer/base.rb#478
1190
+ def delivery_methods; end
1191
+
1192
+ # source://actionmailer//lib/action_mailer/base.rb#478
1193
+ def delivery_methods=(value); end
1194
+
1195
+ # source://actionmailer//lib/action_mailer/base.rb#478
1196
+ def delivery_methods?; end
1197
+
1198
+ # Returns an email in the format "Name <email@example.com>".
1199
+ #
1200
+ # If the name is a blank string, it returns just the address.
1201
+ #
1202
+ # source://actionmailer//lib/action_mailer/base.rb#602
1203
+ def email_address_with_name(address, name); end
1204
+
1205
+ # source://actionmailer//lib/action_mailer/base.rb#494
1206
+ def enable_fragment_cache_logging; end
1207
+
1208
+ # source://actionmailer//lib/action_mailer/base.rb#494
1209
+ def enable_fragment_cache_logging=(value); end
1210
+
1211
+ # source://actionmailer//lib/action_mailer/base.rb#478
1212
+ def file_settings; end
1213
+
1214
+ # source://actionmailer//lib/action_mailer/base.rb#478
1215
+ def file_settings=(value); end
1216
+
1217
+ # source://actionmailer//lib/action_mailer/base.rb#478
1218
+ def file_settings?; end
1219
+
1220
+ # source://actionmailer//lib/action_mailer/base.rb#494
1221
+ def fragment_cache_keys; end
1222
+
1223
+ # source://actionmailer//lib/action_mailer/base.rb#494
1224
+ def fragment_cache_keys=(value); end
1225
+
1226
+ # source://actionmailer//lib/action_mailer/base.rb#494
1227
+ def fragment_cache_keys?; end
1228
+
1229
+ # source://actionmailer//lib/action_mailer/base.rb#492
1230
+ def javascripts_dir; end
1231
+
1232
+ # source://actionmailer//lib/action_mailer/base.rb#492
1233
+ def javascripts_dir=(value); end
1234
+
1235
+ # source://actionmailer//lib/action_mailer/base.rb#489
1236
+ def logger; end
1237
+
1238
+ # source://actionmailer//lib/action_mailer/base.rb#489
1239
+ def logger=(value); end
1240
+
1241
+ # Returns the name of the current mailer. This method is also being used as a path for a view lookup.
1242
+ # If this is an anonymous mailer, this method will return +anonymous+ instead.
1243
+ #
1244
+ # source://actionmailer//lib/action_mailer/base.rb#570
1245
+ def mailer_name; end
1246
+
1247
+ # Allows to set the name of current mailer.
1248
+ #
1249
+ # source://actionmailer//lib/action_mailer/base.rb#574
1250
+ def mailer_name=(_arg0); end
1251
+
1252
+ # source://actionmailer//lib/action_mailer/base.rb#494
1253
+ def perform_caching; end
1254
+
1255
+ # source://actionmailer//lib/action_mailer/base.rb#494
1256
+ def perform_caching=(value); end
1257
+
1258
+ # source://actionmailer//lib/action_mailer/base.rb#478
1259
+ def perform_deliveries; end
1260
+
1261
+ # source://actionmailer//lib/action_mailer/base.rb#478
1262
+ def perform_deliveries=(val); end
1263
+
1264
+ # source://actionmailer//lib/action_mailer/base.rb#482
1265
+ def preview_interceptors; end
1266
+
1267
+ # source://actionmailer//lib/action_mailer/base.rb#482
1268
+ def preview_interceptors=(val); end
1269
+
1270
+ # source://actionmailer//lib/action_mailer/base.rb#482
1271
+ def preview_paths; end
1272
+
1273
+ # source://actionmailer//lib/action_mailer/base.rb#482
1274
+ def preview_paths=(val); end
1275
+
1276
+ # source://actionmailer//lib/action_mailer/base.rb#478
1277
+ def raise_delivery_errors; end
1278
+
1279
+ # source://actionmailer//lib/action_mailer/base.rb#478
1280
+ def raise_delivery_errors=(val); end
1281
+
1282
+ # source://actionmailer//lib/action_mailer/base.rb#493
1283
+ def raise_on_missing_callback_actions; end
1284
+
1285
+ # source://actionmailer//lib/action_mailer/base.rb#493
1286
+ def raise_on_missing_callback_actions=(val); end
1287
+
1288
+ # Register an Interceptor which will be called before mail is sent.
1289
+ # Either a class, string, or symbol can be passed in as the Interceptor.
1290
+ # If a string or symbol is passed in it will be camelized and constantized.
1291
+ #
1292
+ # source://actionmailer//lib/action_mailer/base.rb#547
1293
+ def register_interceptor(interceptor); end
1294
+
1295
+ # Register one or more Interceptors which will be called before mail is sent.
1296
+ #
1297
+ # source://actionmailer//lib/action_mailer/base.rb#521
1298
+ def register_interceptors(*interceptors); end
1299
+
1300
+ # Register an Observer which will be notified when mail is delivered.
1301
+ # Either a class, string, or symbol can be passed in as the Observer.
1302
+ # If a string or symbol is passed in it will be camelized and constantized.
1303
+ #
1304
+ # source://actionmailer//lib/action_mailer/base.rb#533
1305
+ def register_observer(observer); end
1306
+
1307
+ # Register one or more Observers which will be notified when mail is delivered.
1308
+ #
1309
+ # source://actionmailer//lib/action_mailer/base.rb#511
1310
+ def register_observers(*observers); end
1311
+
1312
+ # source://actionmailer//lib/action_mailer/base.rb#492
1313
+ def relative_url_root; end
1314
+
1315
+ # source://actionmailer//lib/action_mailer/base.rb#492
1316
+ def relative_url_root=(value); end
1317
+
1318
+ # source://actionmailer//lib/action_mailer/base.rb#480
1319
+ def rescue_handlers; end
1320
+
1321
+ # source://actionmailer//lib/action_mailer/base.rb#480
1322
+ def rescue_handlers=(value); end
1323
+
1324
+ # source://actionmailer//lib/action_mailer/base.rb#480
1325
+ def rescue_handlers?; end
1326
+
1327
+ # source://actionmailer//lib/action_mailer/base.rb#478
1328
+ def sendmail_settings; end
1329
+
1330
+ # source://actionmailer//lib/action_mailer/base.rb#478
1331
+ def sendmail_settings=(value); end
1332
+
1333
+ # source://actionmailer//lib/action_mailer/base.rb#478
1334
+ def sendmail_settings?; end
1335
+
1336
+ # source://actionmailer//lib/action_mailer/base.rb#482
1337
+ def show_previews; end
1338
+
1339
+ # source://actionmailer//lib/action_mailer/base.rb#482
1340
+ def show_previews=(val); end
1341
+
1342
+ # source://actionmailer//lib/action_mailer/base.rb#478
1343
+ def smtp_settings; end
1344
+
1345
+ # source://actionmailer//lib/action_mailer/base.rb#478
1346
+ def smtp_settings=(value); end
1347
+
1348
+ # source://actionmailer//lib/action_mailer/base.rb#478
1349
+ def smtp_settings?; end
1350
+
1351
+ # source://actionmailer//lib/action_mailer/base.rb#492
1352
+ def stylesheets_dir; end
1353
+
1354
+ # source://actionmailer//lib/action_mailer/base.rb#492
1355
+ def stylesheets_dir=(value); end
1356
+
1357
+ # Emails do not support relative path links.
1358
+ #
1359
+ # @return [Boolean]
1360
+ #
1361
+ # source://actionmailer//lib/action_mailer/base.rb#937
1362
+ def supports_path?; end
1363
+
1364
+ # source://actionmailer//lib/action_mailer/base.rb#478
1365
+ def test_settings; end
1366
+
1367
+ # source://actionmailer//lib/action_mailer/base.rb#478
1368
+ def test_settings=(value); end
1369
+
1370
+ # source://actionmailer//lib/action_mailer/base.rb#478
1371
+ def test_settings?; end
1372
+
1373
+ # Unregister a previously registered Interceptor.
1374
+ # Either a class, string, or symbol can be passed in as the Interceptor.
1375
+ # If a string or symbol is passed in it will be camelized and constantized.
1376
+ #
1377
+ # source://actionmailer//lib/action_mailer/base.rb#554
1378
+ def unregister_interceptor(interceptor); end
1379
+
1380
+ # Unregister one or more previously registered Interceptors.
1381
+ #
1382
+ # source://actionmailer//lib/action_mailer/base.rb#526
1383
+ def unregister_interceptors(*interceptors); end
1384
+
1385
+ # Unregister a previously registered Observer.
1386
+ # Either a class, string, or symbol can be passed in as the Observer.
1387
+ # If a string or symbol is passed in it will be camelized and constantized.
1388
+ #
1389
+ # source://actionmailer//lib/action_mailer/base.rb#540
1390
+ def unregister_observer(observer); end
1391
+
1392
+ # Unregister one or more previously registered Observers.
1393
+ #
1394
+ # source://actionmailer//lib/action_mailer/base.rb#516
1395
+ def unregister_observers(*observers); end
1396
+
1397
+ private
1398
+
1399
+ # source://actionmailer//lib/action_mailer/base.rb#477
1400
+ def __class_attr___callbacks; end
1401
+
1402
+ # source://actionmailer//lib/action_mailer/base.rb#477
1403
+ def __class_attr___callbacks=(new_value); end
1404
+
1405
+ # source://actionmailer//lib/action_mailer/base.rb#483
1406
+ def __class_attr__default_form_builder; end
1407
+
1408
+ # source://actionmailer//lib/action_mailer/base.rb#483
1409
+ def __class_attr__default_form_builder=(new_value); end
1410
+
1411
+ # source://actionmailer//lib/action_mailer/base.rb#490
1412
+ def __class_attr__helper_methods; end
1413
+
1414
+ # source://actionmailer//lib/action_mailer/base.rb#490
1415
+ def __class_attr__helper_methods=(new_value); end
1416
+
1417
+ # source://actionmailer//lib/action_mailer/base.rb#496
1418
+ def __class_attr__layout; end
1419
+
1420
+ # source://actionmailer//lib/action_mailer/base.rb#496
1421
+ def __class_attr__layout=(new_value); end
1422
+
1423
+ # source://actionmailer//lib/action_mailer/base.rb#496
1424
+ def __class_attr__layout_conditions; end
1425
+
1426
+ # source://actionmailer//lib/action_mailer/base.rb#496
1427
+ def __class_attr__layout_conditions=(new_value); end
1428
+
1429
+ # source://actionmailer//lib/action_mailer/base.rb#494
1430
+ def __class_attr__view_cache_dependencies; end
1431
+
1432
+ # source://actionmailer//lib/action_mailer/base.rb#494
1433
+ def __class_attr__view_cache_dependencies=(new_value); end
1434
+
1435
+ # source://actionmailer//lib/action_mailer/base.rb#502
1436
+ def __class_attr_default_params; end
1437
+
1438
+ # source://actionmailer//lib/action_mailer/base.rb#502
1439
+ def __class_attr_default_params=(new_value); end
1440
+
1441
+ # source://actionmailer//lib/action_mailer/base.rb#479
1442
+ def __class_attr_deliver_later_queue_name; end
1443
+
1444
+ # source://actionmailer//lib/action_mailer/base.rb#479
1445
+ def __class_attr_deliver_later_queue_name=(new_value); end
1446
+
1447
+ # source://actionmailer//lib/action_mailer/base.rb#479
1448
+ def __class_attr_delivery_job; end
1449
+
1450
+ # source://actionmailer//lib/action_mailer/base.rb#479
1451
+ def __class_attr_delivery_job=(new_value); end
1452
+
1453
+ # source://actionmailer//lib/action_mailer/base.rb#478
1454
+ def __class_attr_delivery_method; end
1455
+
1456
+ # source://actionmailer//lib/action_mailer/base.rb#478
1457
+ def __class_attr_delivery_method=(new_value); end
1458
+
1459
+ # source://actionmailer//lib/action_mailer/base.rb#478
1460
+ def __class_attr_delivery_methods; end
1461
+
1462
+ # source://actionmailer//lib/action_mailer/base.rb#478
1463
+ def __class_attr_delivery_methods=(new_value); end
1464
+
1465
+ # source://actionmailer//lib/action_mailer/base.rb#478
1466
+ def __class_attr_file_settings; end
1467
+
1468
+ # source://actionmailer//lib/action_mailer/base.rb#478
1469
+ def __class_attr_file_settings=(new_value); end
1470
+
1471
+ # source://actionmailer//lib/action_mailer/base.rb#494
1472
+ def __class_attr_fragment_cache_keys; end
1473
+
1474
+ # source://actionmailer//lib/action_mailer/base.rb#494
1475
+ def __class_attr_fragment_cache_keys=(new_value); end
1476
+
1477
+ # source://actionmailer//lib/action_mailer/base.rb#480
1478
+ def __class_attr_rescue_handlers; end
1479
+
1480
+ # source://actionmailer//lib/action_mailer/base.rb#480
1481
+ def __class_attr_rescue_handlers=(new_value); end
1482
+
1483
+ # source://actionmailer//lib/action_mailer/base.rb#478
1484
+ def __class_attr_sendmail_settings; end
1485
+
1486
+ # source://actionmailer//lib/action_mailer/base.rb#478
1487
+ def __class_attr_sendmail_settings=(new_value); end
1488
+
1489
+ # source://actionmailer//lib/action_mailer/base.rb#478
1490
+ def __class_attr_smtp_settings; end
1491
+
1492
+ # source://actionmailer//lib/action_mailer/base.rb#478
1493
+ def __class_attr_smtp_settings=(new_value); end
1494
+
1495
+ # source://actionmailer//lib/action_mailer/base.rb#478
1496
+ def __class_attr_test_settings; end
1497
+
1498
+ # source://actionmailer//lib/action_mailer/base.rb#478
1499
+ def __class_attr_test_settings=(new_value); end
1500
+
1501
+ # source://actionmailer//lib/action_mailer/base.rb#623
1502
+ def method_missing(method_name, *_arg1, **_arg2, &_arg3); end
1503
+
1504
+ # source://actionmailer//lib/action_mailer/base.rb#558
1505
+ def observer_class_for(value); end
1506
+
1507
+ # @return [Boolean]
1508
+ #
1509
+ # source://actionmailer//lib/action_mailer/base.rb#631
1510
+ def respond_to_missing?(method, include_all = T.unsafe(nil)); end
1511
+
1512
+ # source://actionmailer//lib/action_mailer/base.rb#610
1513
+ def set_payload_for_mail(payload, mail); end
1514
+ end
1515
+ end
1516
+
1517
+ # source://actionmailer//lib/action_mailer/base.rb#490
1518
+ module ActionMailer::Base::HelperMethods
1519
+ include ::ActionMailer::MailHelper
1520
+ include ::ActionText::ContentHelper
1521
+ include ::ActionText::TagHelper
1522
+
1523
+ # source://actionmailer//lib/action_mailer/base.rb#494
1524
+ def combined_fragment_cache_key(*_arg0, **_arg1, &_arg2); end
1525
+
1526
+ # source://actionmailer//lib/action_mailer/base.rb#494
1527
+ def view_cache_dependencies(*_arg0, **_arg1, &_arg2); end
1528
+ end
1529
+
1530
+ # source://actionmailer//lib/action_mailer/base.rb#763
1531
+ class ActionMailer::Base::LateAttachmentsProxy < ::SimpleDelegator
1532
+ # source://actionmailer//lib/action_mailer/base.rb#765
1533
+ def []=(_name, _content); end
1534
+
1535
+ # source://actionmailer//lib/action_mailer/base.rb#764
1536
+ def inline; end
1537
+
1538
+ private
1539
+
1540
+ # @raise [RuntimeError]
1541
+ #
1542
+ # source://actionmailer//lib/action_mailer/base.rb#768
1543
+ def _raise_error; end
1544
+ end
1545
+
1546
+ # source://actionmailer//lib/action_mailer/base.rb#658
1547
+ class ActionMailer::Base::NullMail
1548
+ # source://actionmailer//lib/action_mailer/base.rb#659
1549
+ def body; end
1550
+
1551
+ # source://actionmailer//lib/action_mailer/base.rb#660
1552
+ def header; end
1553
+
1554
+ # source://actionmailer//lib/action_mailer/base.rb#666
1555
+ def method_missing(*_arg0, **_arg1, &_arg2); end
1556
+
1557
+ # @return [Boolean]
1558
+ #
1559
+ # source://actionmailer//lib/action_mailer/base.rb#662
1560
+ def respond_to?(string, include_all = T.unsafe(nil)); end
1561
+ end
1562
+
1563
+ # source://actionmailer//lib/action_mailer/base.rb#498
1564
+ ActionMailer::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array)
1565
+
1566
+ # source://actionmailer//lib/action_mailer/callbacks.rb#4
1567
+ module ActionMailer::Callbacks
1568
+ extend ::ActiveSupport::Concern
1569
+ include GeneratedInstanceMethods
1570
+ include ::ActiveSupport::Callbacks
1571
+
1572
+ mixes_in_class_methods GeneratedClassMethods
1573
+ mixes_in_class_methods ::ActionMailer::Callbacks::ClassMethods
1574
+ mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods
1575
+ mixes_in_class_methods ::ActiveSupport::DescendantsTracker
1576
+
1577
+ module GeneratedClassMethods
1578
+ def __callbacks; end
1579
+ def __callbacks=(value); end
1580
+ end
1581
+
1582
+ module GeneratedInstanceMethods
1583
+ def __callbacks; end
1584
+ end
1585
+ end
1586
+
1587
+ # source://actionmailer//lib/action_mailer/callbacks.rb#12
1588
+ module ActionMailer::Callbacks::ClassMethods
1589
+ # Defines a callback that will get called right after the
1590
+ # message's delivery method is finished.
1591
+ #
1592
+ # source://actionmailer//lib/action_mailer/callbacks.rb#21
1593
+ def after_deliver(*filters, &blk); end
1594
+
1595
+ # Defines a callback that will get called around the message's deliver method.
1596
+ #
1597
+ # source://actionmailer//lib/action_mailer/callbacks.rb#26
1598
+ def around_deliver(*filters, &blk); end
1599
+
1600
+ # Defines a callback that will get called right before the
1601
+ # message is sent to the delivery method.
1602
+ #
1603
+ # source://actionmailer//lib/action_mailer/callbacks.rb#15
1604
+ def before_deliver(*filters, &blk); end
1605
+ end
1606
+
1607
+ # source://actionmailer//lib/action_mailer/collector.rb#8
1608
+ class ActionMailer::Collector
1609
+ include ::AbstractController::Collector
1610
+
1611
+ # @return [Collector] a new instance of Collector
1612
+ #
1613
+ # source://actionmailer//lib/action_mailer/collector.rb#12
1614
+ def initialize(context, &block); end
1615
+
1616
+ # @raise [ArgumentError]
1617
+ #
1618
+ # source://actionmailer//lib/action_mailer/collector.rb#23
1619
+ def all(*args, &block); end
1620
+
1621
+ # @raise [ArgumentError]
1622
+ #
1623
+ # source://actionmailer//lib/action_mailer/collector.rb#18
1624
+ def any(*args, &block); end
1625
+
1626
+ # source://actionmailer//lib/action_mailer/collector.rb#25
1627
+ def custom(mime, options = T.unsafe(nil)); end
1628
+
1629
+ # Returns the value of attribute responses.
1630
+ #
1631
+ # source://actionmailer//lib/action_mailer/collector.rb#10
1632
+ def responses; end
1633
+ end
1634
+
1635
+ # = Action Mailer \DeliveryMethods
1636
+ #
1637
+ # This module handles everything related to mail delivery, from registering
1638
+ # new delivery methods to configuring the mail object to be sent.
1639
+ #
1640
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#10
1641
+ module ActionMailer::DeliveryMethods
1642
+ extend ::ActiveSupport::Concern
1643
+ include GeneratedInstanceMethods
1644
+
1645
+ mixes_in_class_methods GeneratedClassMethods
1646
+ mixes_in_class_methods ::ActionMailer::DeliveryMethods::ClassMethods
1647
+
1648
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#79
1649
+ def wrap_delivery_behavior!(*args); end
1650
+
1651
+ module GeneratedClassMethods
1652
+ def delivery_method; end
1653
+ def delivery_method=(value); end
1654
+ def delivery_method?; end
1655
+ def delivery_methods; end
1656
+ def delivery_methods=(value); end
1657
+ def delivery_methods?; end
1658
+ def file_settings; end
1659
+ def file_settings=(value); end
1660
+ def file_settings?; end
1661
+ def sendmail_settings; end
1662
+ def sendmail_settings=(value); end
1663
+ def sendmail_settings?; end
1664
+ def smtp_settings; end
1665
+ def smtp_settings=(value); end
1666
+ def smtp_settings?; end
1667
+ def test_settings; end
1668
+ def test_settings=(value); end
1669
+ def test_settings?; end
1670
+ end
1671
+
1672
+ module GeneratedInstanceMethods
1673
+ def delivery_method; end
1674
+ def delivery_method=(value); end
1675
+ def delivery_method?; end
1676
+ def delivery_methods; end
1677
+ def delivery_methods=(value); end
1678
+ def delivery_methods?; end
1679
+ def file_settings; end
1680
+ def file_settings=(value); end
1681
+ def file_settings?; end
1682
+ def sendmail_settings; end
1683
+ def sendmail_settings=(value); end
1684
+ def sendmail_settings?; end
1685
+ def smtp_settings; end
1686
+ def smtp_settings=(value); end
1687
+ def smtp_settings?; end
1688
+ def test_settings; end
1689
+ def test_settings=(value); end
1690
+ def test_settings?; end
1691
+ end
1692
+ end
1693
+
1694
+ # Helpers for creating and wrapping delivery behavior, used by DeliveryMethods.
1695
+ #
1696
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#41
1697
+ module ActionMailer::DeliveryMethods::ClassMethods
1698
+ # Adds a new delivery method through the given class using the given
1699
+ # symbol as alias and the default options supplied.
1700
+ #
1701
+ # add_delivery_method :sendmail, Mail::Sendmail,
1702
+ # location: '/usr/sbin/sendmail',
1703
+ # arguments: %w[ -i ]
1704
+ #
1705
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#51
1706
+ def add_delivery_method(symbol, klass, default_options = T.unsafe(nil)); end
1707
+
1708
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#43
1709
+ def deliveries(&_arg0); end
1710
+
1711
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#43
1712
+ def deliveries=(arg); end
1713
+
1714
+ # source://actionmailer//lib/action_mailer/delivery_methods.rb#57
1715
+ def wrap_delivery_behavior(mail, method = T.unsafe(nil), options = T.unsafe(nil)); end
1716
+ end
1717
+
1718
+ # = Action Mailer Form Builder
1719
+ #
1720
+ # Override the default form builder for all views rendered by this
1721
+ # mailer and any of its descendants. Accepts a subclass of
1722
+ # ActionView::Helpers::FormBuilder.
1723
+ #
1724
+ # While emails typically will not include forms, this can be used
1725
+ # by views that are shared between controllers and mailers.
1726
+ #
1727
+ # For more information, see +ActionController::FormBuilder+.
1728
+ #
1729
+ # source://actionmailer//lib/action_mailer/form_builder.rb#14
1730
+ module ActionMailer::FormBuilder
1731
+ extend ::ActiveSupport::Concern
1732
+ include GeneratedInstanceMethods
1733
+
1734
+ mixes_in_class_methods GeneratedClassMethods
1735
+ mixes_in_class_methods ::ActionMailer::FormBuilder::ClassMethods
1736
+
1737
+ # Default form builder for the mailer
1738
+ #
1739
+ # source://actionmailer//lib/action_mailer/form_builder.rb#33
1740
+ def default_form_builder; end
1741
+
1742
+ module GeneratedClassMethods
1743
+ def _default_form_builder; end
1744
+ def _default_form_builder=(value); end
1745
+ def _default_form_builder?; end
1746
+ end
1747
+
1748
+ module GeneratedInstanceMethods; end
1749
+ end
1750
+
1751
+ # source://actionmailer//lib/action_mailer/form_builder.rb#21
1752
+ module ActionMailer::FormBuilder::ClassMethods
1753
+ # Set the form builder to be used as the default for all forms
1754
+ # in the views rendered by this mailer and its subclasses.
1755
+ #
1756
+ # ==== Parameters
1757
+ # * <tt>builder</tt> - Default form builder, an instance of ActionView::Helpers::FormBuilder
1758
+ #
1759
+ # source://actionmailer//lib/action_mailer/form_builder.rb#27
1760
+ def default_form_builder(builder); end
1761
+ end
1762
+
1763
+ # = Action Mailer \InlinePreviewInterceptor
1764
+ #
1765
+ # Implements a mailer preview interceptor that converts image tag src attributes
1766
+ # that use inline +cid:+ style URLs to +data:+ style URLs so that they are visible
1767
+ # when previewing an HTML email in a web browser.
1768
+ #
1769
+ # This interceptor is enabled by default. To disable it, delete it from the
1770
+ # <tt>ActionMailer::Base.preview_interceptors</tt> array:
1771
+ #
1772
+ # ActionMailer::Base.preview_interceptors.delete(ActionMailer::InlinePreviewInterceptor)
1773
+ #
1774
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#17
1775
+ class ActionMailer::InlinePreviewInterceptor
1776
+ include ::Base64
1777
+
1778
+ # @return [InlinePreviewInterceptor] a new instance of InlinePreviewInterceptor
1779
+ #
1780
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#26
1781
+ def initialize(message); end
1782
+
1783
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#30
1784
+ def transform!; end
1785
+
1786
+ private
1787
+
1788
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#51
1789
+ def data_url(part); end
1790
+
1791
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#55
1792
+ def find_part(cid); end
1793
+
1794
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#47
1795
+ def html_part; end
1796
+
1797
+ # Returns the value of attribute message.
1798
+ #
1799
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#45
1800
+ def message; end
1801
+
1802
+ class << self
1803
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#22
1804
+ def previewing_email(message); end
1805
+ end
1806
+ end
1807
+
1808
+ # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#18
1809
+ ActionMailer::InlinePreviewInterceptor::PATTERN = T.let(T.unsafe(nil), Regexp)
1810
+
1811
+ # = Action Mailer \LogSubscriber
1812
+ #
1813
+ # Implements the ActiveSupport::LogSubscriber for logging notifications when
1814
+ # email is delivered or received.
1815
+ #
1816
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#10
1817
+ class ActionMailer::LogSubscriber < ::ActiveSupport::LogSubscriber
1818
+ # An email was delivered.
1819
+ #
1820
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#12
1821
+ def deliver(event); end
1822
+
1823
+ # Use the logger configured for ActionMailer::Base.
1824
+ #
1825
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#38
1826
+ def logger; end
1827
+
1828
+ # An email was generated.
1829
+ #
1830
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#28
1831
+ def process(event); end
1832
+
1833
+ class << self
1834
+ private
1835
+
1836
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#25
1837
+ def __class_attr_log_levels; end
1838
+
1839
+ # source://actionmailer//lib/action_mailer/log_subscriber.rb#25
1840
+ def __class_attr_log_levels=(new_value); end
1841
+ end
1842
+ end
1843
+
1844
+ # = Action Mailer \MailDeliveryJob
1845
+ #
1846
+ # The +ActionMailer::MailDeliveryJob+ class is used when you
1847
+ # want to send emails outside of the request-response cycle. It supports
1848
+ # sending either parameterized or normal mail.
1849
+ #
1850
+ # Exceptions are rescued and handled by the mailer class.
1851
+ #
1852
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#13
1853
+ class ActionMailer::MailDeliveryJob < ::ActiveJob::Base
1854
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#21
1855
+ def perform(mailer, mail_method, delivery_method, args:, kwargs: T.unsafe(nil), params: T.unsafe(nil)); end
1856
+
1857
+ private
1858
+
1859
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#40
1860
+ def handle_exception_with_mailer_class(exception); end
1861
+
1862
+ # "Deserialize" the mailer class name by hand in case another argument
1863
+ # (like a Global ID reference) raised DeserializationError.
1864
+ #
1865
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#34
1866
+ def mailer_class; end
1867
+
1868
+ class << self
1869
+ private
1870
+
1871
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#14
1872
+ def __class_attr_queue_name; end
1873
+
1874
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#14
1875
+ def __class_attr_queue_name=(new_value); end
1876
+
1877
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#19
1878
+ def __class_attr_rescue_handlers; end
1879
+
1880
+ # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#19
1881
+ def __class_attr_rescue_handlers=(new_value); end
1882
+ end
1883
+ end
1884
+
1885
+ # = Action Mailer \MailHelper
1886
+ #
1887
+ # Provides helper methods for ActionMailer::Base that can be used for easily
1888
+ # formatting messages, accessing mailer or message instances, and the
1889
+ # attachments list.
1890
+ #
1891
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#9
1892
+ module ActionMailer::MailHelper
1893
+ # Access the message attachments list.
1894
+ #
1895
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#53
1896
+ def attachments; end
1897
+
1898
+ # Take the text and format it, indented two spaces for each line, and
1899
+ # wrapped at 72 columns:
1900
+ #
1901
+ # text = <<-TEXT
1902
+ # This is
1903
+ # the paragraph.
1904
+ #
1905
+ # * item1 * item2
1906
+ # TEXT
1907
+ #
1908
+ # block_format text
1909
+ # # => " This is the paragraph.\n\n * item1\n * item2\n"
1910
+ #
1911
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#22
1912
+ def block_format(text); end
1913
+
1914
+ # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces.
1915
+ # By default column length +len+ equals 72 characters and indent
1916
+ # +indent+ equal two spaces.
1917
+ #
1918
+ # my_text = 'Here is a sample text with more than 40 characters'
1919
+ #
1920
+ # format_paragraph(my_text, 25, 4)
1921
+ # # => " Here is a sample text with\n more than 40 characters"
1922
+ #
1923
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#65
1924
+ def format_paragraph(text, len = T.unsafe(nil), indent = T.unsafe(nil)); end
1925
+
1926
+ # Access the mailer instance.
1927
+ #
1928
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#43
1929
+ def mailer; end
1930
+
1931
+ # Access the message instance.
1932
+ #
1933
+ # source://actionmailer//lib/action_mailer/mail_helper.rb#48
1934
+ def message; end
1935
+ end
1936
+
1937
+ # = Action Mailer \MessageDelivery
1938
+ #
1939
+ # The +ActionMailer::MessageDelivery+ class is used by
1940
+ # ActionMailer::Base when creating a new mailer.
1941
+ # <tt>MessageDelivery</tt> is a wrapper (+Delegator+ subclass) around a lazy
1942
+ # created +Mail::Message+. You can get direct access to the
1943
+ # +Mail::Message+, deliver the email or schedule the email to be sent
1944
+ # through Active Job.
1945
+ #
1946
+ # Notifier.welcome(User.first) # an ActionMailer::MessageDelivery object
1947
+ # Notifier.welcome(User.first).deliver_now # sends the email
1948
+ # Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job
1949
+ # Notifier.welcome(User.first).message # a Mail::Message object
1950
+ #
1951
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#19
1952
+ class ActionMailer::MessageDelivery
1953
+ # @return [MessageDelivery] a new instance of MessageDelivery
1954
+ #
1955
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#20
1956
+ def initialize(mailer_class, action, *args, **_arg3); end
1957
+
1958
+ # Method calls are delegated to the Mail::Message that's ready to deliver.
1959
+ #
1960
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#31
1961
+ def __getobj__; end
1962
+
1963
+ # Unused except for delegator internals (dup, marshalling).
1964
+ #
1965
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#36
1966
+ def __setobj__(mail_message); end
1967
+
1968
+ # Enqueues the email to be delivered through Active Job. When the
1969
+ # job runs it will send the email using +deliver_now+.
1970
+ #
1971
+ # Notifier.welcome(User.first).deliver_later
1972
+ # Notifier.welcome(User.first).deliver_later(wait: 1.hour)
1973
+ # Notifier.welcome(User.first).deliver_later(wait_until: 10.hours.from_now)
1974
+ # Notifier.welcome(User.first).deliver_later(priority: 10)
1975
+ #
1976
+ # Options:
1977
+ #
1978
+ # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay.
1979
+ # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time.
1980
+ # * <tt>:queue</tt> - Enqueue the email on the specified queue.
1981
+ # * <tt>:priority</tt> - Enqueues the email with the specified priority
1982
+ #
1983
+ # By default, the email will be enqueued using ActionMailer::MailDeliveryJob on
1984
+ # the default queue. Mailer classes can customize the queue name used for the default
1985
+ # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job
1986
+ # by assigning a +delivery_job+. When a custom job is used, it controls the queue name.
1987
+ #
1988
+ # class AccountRegistrationMailer < ApplicationMailer
1989
+ # self.delivery_job = RegistrationDeliveryJob
1990
+ # end
1991
+ #
1992
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#102
1993
+ def deliver_later(options = T.unsafe(nil)); end
1994
+
1995
+ # Enqueues the email to be delivered through Active Job. When the
1996
+ # job runs it will send the email using +deliver_now!+. That means
1997
+ # that the message will be sent bypassing checking +perform_deliveries+
1998
+ # and +raise_delivery_errors+, so use with caution.
1999
+ #
2000
+ # Notifier.welcome(User.first).deliver_later!
2001
+ # Notifier.welcome(User.first).deliver_later!(wait: 1.hour)
2002
+ # Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now)
2003
+ # Notifier.welcome(User.first).deliver_later!(priority: 10)
2004
+ #
2005
+ # Options:
2006
+ #
2007
+ # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
2008
+ # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time
2009
+ # * <tt>:queue</tt> - Enqueue the email on the specified queue
2010
+ # * <tt>:priority</tt> - Enqueues the email with the specified priority
2011
+ #
2012
+ # By default, the email will be enqueued using ActionMailer::MailDeliveryJob on
2013
+ # the default queue. Mailer classes can customize the queue name used for the default
2014
+ # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job
2015
+ # by assigning a +delivery_job+. When a custom job is used, it controls the queue name.
2016
+ #
2017
+ # class AccountRegistrationMailer < ApplicationMailer
2018
+ # self.delivery_job = RegistrationDeliveryJob
2019
+ # end
2020
+ #
2021
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#75
2022
+ def deliver_later!(options = T.unsafe(nil)); end
2023
+
2024
+ # Delivers an email:
2025
+ #
2026
+ # Notifier.welcome(User.first).deliver_now
2027
+ #
2028
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#123
2029
+ def deliver_now; end
2030
+
2031
+ # Delivers an email without checking +perform_deliveries+ and +raise_delivery_errors+,
2032
+ # so use with caution.
2033
+ #
2034
+ # Notifier.welcome(User.first).deliver_now!
2035
+ #
2036
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#111
2037
+ def deliver_now!; end
2038
+
2039
+ # Returns the resulting Mail::Message
2040
+ #
2041
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#41
2042
+ def message; end
2043
+
2044
+ # Was the delegate loaded, causing the mailer action to be processed?
2045
+ #
2046
+ # @return [Boolean]
2047
+ #
2048
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#46
2049
+ def processed?; end
2050
+
2051
+ private
2052
+
2053
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#140
2054
+ def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end
2055
+
2056
+ # Returns the processed Mailer instance. We keep this instance
2057
+ # on hand so we can run callbacks and delegate exception handling to it.
2058
+ #
2059
+ # source://actionmailer//lib/action_mailer/message_delivery.rb#134
2060
+ def processed_mailer; end
2061
+ end
2062
+
2063
+ # source://actionmailer//lib/action_mailer/test_case.rb#7
2064
+ class ActionMailer::NonInferrableMailerError < ::StandardError
2065
+ # @return [NonInferrableMailerError] a new instance of NonInferrableMailerError
2066
+ #
2067
+ # source://actionmailer//lib/action_mailer/test_case.rb#8
2068
+ def initialize(name); end
2069
+ end
2070
+
2071
+ # = Action Mailer \Parameterized
2072
+ #
2073
+ # Provides the option to parameterize mailers in order to share instance variable
2074
+ # setup, processing, and common headers.
2075
+ #
2076
+ # Consider this example that does not use parameterization:
2077
+ #
2078
+ # class InvitationsMailer < ApplicationMailer
2079
+ # def account_invitation(inviter, invitee)
2080
+ # @account = inviter.account
2081
+ # @inviter = inviter
2082
+ # @invitee = invitee
2083
+ #
2084
+ # subject = "#{@inviter.name} invited you to their Basecamp (#{@account.name})"
2085
+ #
2086
+ # mail \
2087
+ # subject: subject,
2088
+ # to: invitee.email_address,
2089
+ # from: common_address(inviter),
2090
+ # reply_to: inviter.email_address_with_name
2091
+ # end
2092
+ #
2093
+ # def project_invitation(project, inviter, invitee)
2094
+ # @account = inviter.account
2095
+ # @project = project
2096
+ # @inviter = inviter
2097
+ # @invitee = invitee
2098
+ # @summarizer = ProjectInvitationSummarizer.new(@project.bucket)
2099
+ #
2100
+ # subject = "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})"
2101
+ #
2102
+ # mail \
2103
+ # subject: subject,
2104
+ # to: invitee.email_address,
2105
+ # from: common_address(inviter),
2106
+ # reply_to: inviter.email_address_with_name
2107
+ # end
2108
+ #
2109
+ # def bulk_project_invitation(projects, inviter, invitee)
2110
+ # @account = inviter.account
2111
+ # @projects = projects.sort_by(&:name)
2112
+ # @inviter = inviter
2113
+ # @invitee = invitee
2114
+ #
2115
+ # subject = "#{@inviter.name.familiar} added you to some new stuff in Basecamp (#{@account.name})"
2116
+ #
2117
+ # mail \
2118
+ # subject: subject,
2119
+ # to: invitee.email_address,
2120
+ # from: common_address(inviter),
2121
+ # reply_to: inviter.email_address_with_name
2122
+ # end
2123
+ # end
2124
+ #
2125
+ # InvitationsMailer.account_invitation(person_a, person_b).deliver_later
2126
+ #
2127
+ # Using parameterized mailers, this can be rewritten as:
2128
+ #
2129
+ # class InvitationsMailer < ApplicationMailer
2130
+ # before_action { @inviter, @invitee = params[:inviter], params[:invitee] }
2131
+ # before_action { @account = params[:inviter].account }
2132
+ #
2133
+ # default to: -> { @invitee.email_address },
2134
+ # from: -> { common_address(@inviter) },
2135
+ # reply_to: -> { @inviter.email_address_with_name }
2136
+ #
2137
+ # def account_invitation
2138
+ # mail subject: "#{@inviter.name} invited you to their Basecamp (#{@account.name})"
2139
+ # end
2140
+ #
2141
+ # def project_invitation
2142
+ # @project = params[:project]
2143
+ # @summarizer = ProjectInvitationSummarizer.new(@project.bucket)
2144
+ #
2145
+ # mail subject: "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})"
2146
+ # end
2147
+ #
2148
+ # def bulk_project_invitation
2149
+ # @projects = params[:projects].sort_by(&:name)
2150
+ #
2151
+ # mail subject: "#{@inviter.name.familiar} added you to some new stuff in Basecamp (#{@account.name})"
2152
+ # end
2153
+ # end
2154
+ #
2155
+ # InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later
2156
+ #
2157
+ # source://actionmailer//lib/action_mailer/parameterized.rb#89
2158
+ module ActionMailer::Parameterized
2159
+ extend ::ActiveSupport::Concern
2160
+
2161
+ mixes_in_class_methods ::ActionMailer::Parameterized::ClassMethods
2162
+ end
2163
+
2164
+ # source://actionmailer//lib/action_mailer/parameterized.rb#100
2165
+ module ActionMailer::Parameterized::ClassMethods
2166
+ # Provide the parameters to the mailer in order to use them in the instance methods and callbacks.
2167
+ #
2168
+ # InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later
2169
+ #
2170
+ # See Parameterized documentation for full example.
2171
+ #
2172
+ # source://actionmailer//lib/action_mailer/parameterized.rb#106
2173
+ def with(params); end
2174
+ end
2175
+
2176
+ # source://actionmailer//lib/action_mailer/parameterized.rb#111
2177
+ class ActionMailer::Parameterized::Mailer
2178
+ # @return [Mailer] a new instance of Mailer
2179
+ #
2180
+ # source://actionmailer//lib/action_mailer/parameterized.rb#112
2181
+ def initialize(mailer, params); end
2182
+
2183
+ private
2184
+
2185
+ # source://actionmailer//lib/action_mailer/parameterized.rb#117
2186
+ def method_missing(method_name, *_arg1, **_arg2, &_arg3); end
2187
+
2188
+ # @return [Boolean]
2189
+ #
2190
+ # source://actionmailer//lib/action_mailer/parameterized.rb#125
2191
+ def respond_to_missing?(method, include_all = T.unsafe(nil)); end
2192
+ end
2193
+
2194
+ # source://actionmailer//lib/action_mailer/parameterized.rb#130
2195
+ class ActionMailer::Parameterized::MessageDelivery < ::ActionMailer::MessageDelivery
2196
+ # @return [MessageDelivery] a new instance of MessageDelivery
2197
+ #
2198
+ # source://actionmailer//lib/action_mailer/parameterized.rb#131
2199
+ def initialize(mailer_class, action, params, *_arg3, **_arg4, &_arg5); end
2200
+
2201
+ private
2202
+
2203
+ # source://actionmailer//lib/action_mailer/parameterized.rb#144
2204
+ def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end
2205
+
2206
+ # source://actionmailer//lib/action_mailer/parameterized.rb#137
2207
+ def processed_mailer; end
2208
+ end
2209
+
2210
+ # source://actionmailer//lib/action_mailer/preview.rb#69
2211
+ class ActionMailer::Preview
2212
+ extend ::ActiveSupport::DescendantsTracker
2213
+
2214
+ # @return [Preview] a new instance of Preview
2215
+ #
2216
+ # source://actionmailer//lib/action_mailer/preview.rb#74
2217
+ def initialize(params = T.unsafe(nil)); end
2218
+
2219
+ # Returns the value of attribute params.
2220
+ #
2221
+ # source://actionmailer//lib/action_mailer/preview.rb#72
2222
+ def params; end
2223
+
2224
+ class << self
2225
+ # Returns all mailer preview classes.
2226
+ #
2227
+ # source://actionmailer//lib/action_mailer/preview.rb#80
2228
+ def all; end
2229
+
2230
+ # Returns the mail object for the given email name. The registered preview
2231
+ # interceptors will be informed so that they can transform the message
2232
+ # as they would if the mail was actually being delivered.
2233
+ #
2234
+ # source://actionmailer//lib/action_mailer/preview.rb#88
2235
+ def call(email, params = T.unsafe(nil)); end
2236
+
2237
+ # Returns +true+ if the email exists.
2238
+ #
2239
+ # @return [Boolean]
2240
+ #
2241
+ # source://actionmailer//lib/action_mailer/preview.rb#101
2242
+ def email_exists?(email); end
2243
+
2244
+ # Returns all of the available email previews.
2245
+ #
2246
+ # source://actionmailer//lib/action_mailer/preview.rb#96
2247
+ def emails; end
2248
+
2249
+ # Returns +true+ if the preview exists.
2250
+ #
2251
+ # @return [Boolean]
2252
+ #
2253
+ # source://actionmailer//lib/action_mailer/preview.rb#106
2254
+ def exists?(preview); end
2255
+
2256
+ # Find a mailer preview by its underscored class name.
2257
+ #
2258
+ # source://actionmailer//lib/action_mailer/preview.rb#111
2259
+ def find(preview); end
2260
+
2261
+ # Returns the underscored name of the mailer preview without the suffix.
2262
+ #
2263
+ # source://actionmailer//lib/action_mailer/preview.rb#116
2264
+ def preview_name; end
2265
+
2266
+ private
2267
+
2268
+ # source://actionmailer//lib/action_mailer/preview.rb#135
2269
+ def inform_preview_interceptors(message); end
2270
+
2271
+ # source://actionmailer//lib/action_mailer/preview.rb#121
2272
+ def load_previews; end
2273
+
2274
+ # source://actionmailer//lib/action_mailer/preview.rb#127
2275
+ def preview_paths; end
2276
+
2277
+ # source://actionmailer//lib/action_mailer/preview.rb#131
2278
+ def show_previews; end
2279
+ end
2280
+ end
2281
+
2282
+ # source://actionmailer//lib/action_mailer/preview.rb#6
2283
+ module ActionMailer::Previews
2284
+ extend ::ActiveSupport::Concern
2285
+
2286
+ mixes_in_class_methods ::ActionMailer::Previews::ClassMethods
2287
+ end
2288
+
2289
+ # source://actionmailer//lib/action_mailer/preview.rb#28
2290
+ module ActionMailer::Previews::ClassMethods
2291
+ # Register an Interceptor which will be called before mail is previewed.
2292
+ # Either a class or a string can be passed in as the Interceptor. If a
2293
+ # string is passed in it will be constantized.
2294
+ #
2295
+ # source://actionmailer//lib/action_mailer/preview.rb#42
2296
+ def register_preview_interceptor(interceptor); end
2297
+
2298
+ # Register one or more Interceptors which will be called before mail is previewed.
2299
+ #
2300
+ # source://actionmailer//lib/action_mailer/preview.rb#30
2301
+ def register_preview_interceptors(*interceptors); end
2302
+
2303
+ # Unregister a previously registered Interceptor.
2304
+ # Either a class or a string can be passed in as the Interceptor. If a
2305
+ # string is passed in it will be constantized.
2306
+ #
2307
+ # source://actionmailer//lib/action_mailer/preview.rb#53
2308
+ def unregister_preview_interceptor(interceptor); end
2309
+
2310
+ # Unregister one or more previously registered Interceptors.
2311
+ #
2312
+ # source://actionmailer//lib/action_mailer/preview.rb#35
2313
+ def unregister_preview_interceptors(*interceptors); end
2314
+
2315
+ private
2316
+
2317
+ # source://actionmailer//lib/action_mailer/preview.rb#58
2318
+ def interceptor_class_for(interceptor); end
2319
+ end
2320
+
2321
+ # source://actionmailer//lib/action_mailer/queued_delivery.rb#4
2322
+ module ActionMailer::QueuedDelivery
2323
+ extend ::ActiveSupport::Concern
2324
+ include GeneratedInstanceMethods
2325
+
2326
+ mixes_in_class_methods GeneratedClassMethods
2327
+
2328
+ module GeneratedClassMethods
2329
+ def deliver_later_queue_name; end
2330
+ def deliver_later_queue_name=(value); end
2331
+ def deliver_later_queue_name?; end
2332
+ def delivery_job; end
2333
+ def delivery_job=(value); end
2334
+ def delivery_job?; end
2335
+ end
2336
+
2337
+ module GeneratedInstanceMethods
2338
+ def deliver_later_queue_name; end
2339
+ def deliver_later_queue_name=(value); end
2340
+ def deliver_later_queue_name?; end
2341
+ def delivery_job; end
2342
+ def delivery_job=(value); end
2343
+ def delivery_job?; end
2344
+ end
2345
+ end
2346
+
2347
+ # source://actionmailer//lib/action_mailer/railtie.rb#9
2348
+ class ActionMailer::Railtie < ::Rails::Railtie; end
2349
+
2350
+ # = Action Mailer \Rescuable
2351
+ #
2352
+ # Provides
2353
+ # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]
2354
+ # for mailers. Wraps mailer action processing, mail job processing, and mail
2355
+ # delivery to handle configured errors.
2356
+ #
2357
+ # source://actionmailer//lib/action_mailer/rescuable.rb#10
2358
+ module ActionMailer::Rescuable
2359
+ extend ::ActiveSupport::Concern
2360
+ include GeneratedInstanceMethods
2361
+ include ::ActiveSupport::Rescuable
2362
+
2363
+ mixes_in_class_methods GeneratedClassMethods
2364
+ mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods
2365
+ mixes_in_class_methods ::ActionMailer::Rescuable::ClassMethods
2366
+
2367
+ # source://actionmailer//lib/action_mailer/rescuable.rb#20
2368
+ def handle_exceptions; end
2369
+
2370
+ private
2371
+
2372
+ # source://actionmailer//lib/action_mailer/rescuable.rb#27
2373
+ def process(*_arg0, **_arg1, &_arg2); end
2374
+
2375
+ module GeneratedClassMethods
2376
+ def rescue_handlers; end
2377
+ def rescue_handlers=(value); end
2378
+ def rescue_handlers?; end
2379
+ end
2380
+
2381
+ module GeneratedInstanceMethods
2382
+ def rescue_handlers; end
2383
+ def rescue_handlers=(value); end
2384
+ def rescue_handlers?; end
2385
+ end
2386
+ end
2387
+
2388
+ # source://actionmailer//lib/action_mailer/rescuable.rb#14
2389
+ module ActionMailer::Rescuable::ClassMethods
2390
+ # source://actionmailer//lib/action_mailer/rescuable.rb#15
2391
+ def handle_exception(exception); end
2392
+ end
2393
+
2394
+ # source://actionmailer//lib/action_mailer/test_case.rb#15
2395
+ class ActionMailer::TestCase < ::ActiveSupport::TestCase
2396
+ include ::ActiveSupport::Testing::ConstantLookup
2397
+ include ::ActiveJob::TestHelper
2398
+ include ::ActionMailer::TestHelper
2399
+ include ::Rails::Dom::Testing::Assertions::SelectorAssertions
2400
+ include ::Rails::Dom::Testing::Assertions::DomAssertions
2401
+ include ::ActionMailer::TestCase::Behavior
2402
+ extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods
2403
+ extend ::ActionMailer::TestCase::Behavior::ClassMethods
2404
+
2405
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2406
+ def _mailer_class; end
2407
+
2408
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2409
+ def _mailer_class=(_arg0); end
2410
+
2411
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2412
+ def _mailer_class?; end
2413
+
2414
+ class << self
2415
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2416
+ def _mailer_class; end
2417
+
2418
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2419
+ def _mailer_class=(value); end
2420
+
2421
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2422
+ def _mailer_class?; end
2423
+
2424
+ private
2425
+
2426
+ # source://actionmailer//lib/action_mailer/test_case.rb#42
2427
+ def __class_attr___callbacks; end
2428
+
2429
+ # source://actionmailer//lib/action_mailer/test_case.rb#42
2430
+ def __class_attr___callbacks=(new_value); end
2431
+
2432
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2433
+ def __class_attr__mailer_class; end
2434
+
2435
+ # source://actionmailer//lib/action_mailer/test_case.rb#41
2436
+ def __class_attr__mailer_class=(new_value); end
2437
+ end
2438
+ end
2439
+
2440
+ # source://actionmailer//lib/action_mailer/test_case.rb#32
2441
+ module ActionMailer::TestCase::Behavior
2442
+ include ::ActiveSupport::Testing::Assertions
2443
+ include ::ActiveJob::TestHelper
2444
+ include ::ActionMailer::TestHelper
2445
+ include ::Rails::Dom::Testing::Assertions::SelectorAssertions
2446
+ include ::Rails::Dom::Testing::Assertions::DomAssertions
2447
+ extend ::ActiveSupport::Concern
2448
+ include GeneratedInstanceMethods
2449
+ include ::ActiveSupport::Testing::ConstantLookup
2450
+
2451
+ mixes_in_class_methods GeneratedClassMethods
2452
+ mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods
2453
+ mixes_in_class_methods ::ActionMailer::TestCase::Behavior::ClassMethods
2454
+
2455
+ # Reads the fixture file for the given mailer.
2456
+ #
2457
+ # This is useful when testing mailers by being able to write the body of
2458
+ # an email inside a fixture. See the testing guide for a concrete example:
2459
+ # https://guides.rubyonrails.org/testing.html#revenge-of-the-fixtures
2460
+ #
2461
+ # source://actionmailer//lib/action_mailer/test_case.rb#82
2462
+ def read_fixture(action); end
2463
+
2464
+ private
2465
+
2466
+ # source://actionmailer//lib/action_mailer/test_case.rb#115
2467
+ def charset; end
2468
+
2469
+ # source://actionmailer//lib/action_mailer/test_case.rb#119
2470
+ def encode(subject); end
2471
+
2472
+ # source://actionmailer//lib/action_mailer/test_case.rb#87
2473
+ def initialize_test_deliveries; end
2474
+
2475
+ # source://actionmailer//lib/action_mailer/test_case.rb#104
2476
+ def restore_delivery_method; end
2477
+
2478
+ # source://actionmailer//lib/action_mailer/test_case.rb#94
2479
+ def restore_test_deliveries; end
2480
+
2481
+ # source://actionmailer//lib/action_mailer/test_case.rb#99
2482
+ def set_delivery_method(method); end
2483
+
2484
+ # source://actionmailer//lib/action_mailer/test_case.rb#109
2485
+ def set_expected_mail; end
2486
+
2487
+ module GeneratedClassMethods
2488
+ def _mailer_class; end
2489
+ def _mailer_class=(value); end
2490
+ def _mailer_class?; end
2491
+ end
2492
+
2493
+ module GeneratedInstanceMethods
2494
+ def _mailer_class; end
2495
+ def _mailer_class=(value); end
2496
+ def _mailer_class?; end
2497
+ end
2498
+ end
2499
+
2500
+ # source://actionmailer//lib/action_mailer/test_case.rb#48
2501
+ module ActionMailer::TestCase::Behavior::ClassMethods
2502
+ # @raise [NonInferrableMailerError]
2503
+ #
2504
+ # source://actionmailer//lib/action_mailer/test_case.rb#68
2505
+ def determine_default_mailer(name); end
2506
+
2507
+ # source://actionmailer//lib/action_mailer/test_case.rb#60
2508
+ def mailer_class; end
2509
+
2510
+ # source://actionmailer//lib/action_mailer/test_case.rb#49
2511
+ def tests(mailer); end
2512
+ end
2513
+
2514
+ # source://actionmailer//lib/action_mailer/test_case.rb#16
2515
+ module ActionMailer::TestCase::ClearTestDeliveries
2516
+ extend ::ActiveSupport::Concern
2517
+
2518
+ private
2519
+
2520
+ # source://actionmailer//lib/action_mailer/test_case.rb#25
2521
+ def clear_test_deliveries; end
2522
+ end
2523
+
2524
+ # Provides helper methods for testing Action Mailer, including #assert_emails
2525
+ # and #assert_no_emails.
2526
+ #
2527
+ # source://actionmailer//lib/action_mailer/test_helper.rb#9
2528
+ module ActionMailer::TestHelper
2529
+ include ::ActiveSupport::Testing::Assertions
2530
+ include ::ActiveJob::TestHelper
2531
+
2532
+ # Asserts that the number of emails sent matches the given number.
2533
+ #
2534
+ # def test_emails
2535
+ # assert_emails 0
2536
+ # ContactMailer.welcome.deliver_now
2537
+ # assert_emails 1
2538
+ # ContactMailer.welcome.deliver_now
2539
+ # assert_emails 2
2540
+ # end
2541
+ #
2542
+ # If a block is passed, that block should cause the specified number of
2543
+ # emails to be sent.
2544
+ #
2545
+ # def test_emails_again
2546
+ # assert_emails 1 do
2547
+ # ContactMailer.welcome.deliver_now
2548
+ # end
2549
+ #
2550
+ # assert_emails 2 do
2551
+ # ContactMailer.welcome.deliver_now
2552
+ # ContactMailer.welcome.deliver_later
2553
+ # end
2554
+ # end
2555
+ #
2556
+ # source://actionmailer//lib/action_mailer/test_helper.rb#35
2557
+ def assert_emails(number, &block); end
2558
+
2559
+ # Asserts that a specific email has been enqueued, optionally
2560
+ # matching arguments and/or params.
2561
+ #
2562
+ # def test_email
2563
+ # ContactMailer.welcome.deliver_later
2564
+ # assert_enqueued_email_with ContactMailer, :welcome
2565
+ # end
2566
+ #
2567
+ # def test_email_with_parameters
2568
+ # ContactMailer.with(greeting: "Hello").welcome.deliver_later
2569
+ # assert_enqueued_email_with ContactMailer, :welcome, args: { greeting: "Hello" }
2570
+ # end
2571
+ #
2572
+ # def test_email_with_arguments
2573
+ # ContactMailer.welcome("Hello", "Goodbye").deliver_later
2574
+ # assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
2575
+ # end
2576
+ #
2577
+ # def test_email_with_named_arguments
2578
+ # ContactMailer.welcome(greeting: "Hello", farewell: "Goodbye").deliver_later
2579
+ # assert_enqueued_email_with ContactMailer, :welcome, args: [{ greeting: "Hello", farewell: "Goodbye" }]
2580
+ # end
2581
+ #
2582
+ # def test_email_with_parameters_and_arguments
2583
+ # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later
2584
+ # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: ["Cheers", "Goodbye"]
2585
+ # end
2586
+ #
2587
+ # def test_email_with_parameters_and_named_arguments
2588
+ # ContactMailer.with(greeting: "Hello").welcome(farewell: "Goodbye").deliver_later
2589
+ # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: [{farewell: "Goodbye"}]
2590
+ # end
2591
+ #
2592
+ # def test_email_with_parameterized_mailer
2593
+ # ContactMailer.with(greeting: "Hello").welcome.deliver_later
2594
+ # assert_enqueued_email_with ContactMailer.with(greeting: "Hello"), :welcome
2595
+ # end
2596
+ #
2597
+ # def test_email_with_matchers
2598
+ # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later
2599
+ # assert_enqueued_email_with ContactMailer, :welcome,
2600
+ # params: ->(params) { /hello/i.match?(params[:greeting]) },
2601
+ # args: ->(args) { /cheers/i.match?(args[0]) }
2602
+ # end
2603
+ #
2604
+ # If a block is passed, that block should cause the specified email
2605
+ # to be enqueued.
2606
+ #
2607
+ # def test_email_in_block
2608
+ # assert_enqueued_email_with ContactMailer, :welcome do
2609
+ # ContactMailer.welcome.deliver_later
2610
+ # end
2611
+ # end
2612
+ #
2613
+ # If +args+ is provided as a Hash, a parameterized email is matched.
2614
+ #
2615
+ # def test_parameterized_email
2616
+ # assert_enqueued_email_with ContactMailer, :welcome,
2617
+ # args: {email: 'user@example.com'} do
2618
+ # ContactMailer.with(email: 'user@example.com').welcome.deliver_later
2619
+ # end
2620
+ # end
2621
+ #
2622
+ # source://actionmailer//lib/action_mailer/test_helper.rb#157
2623
+ def assert_enqueued_email_with(mailer, method, params: T.unsafe(nil), args: T.unsafe(nil), queue: T.unsafe(nil), &block); end
2624
+
2625
+ # Asserts that the number of emails enqueued for later delivery matches
2626
+ # the given number.
2627
+ #
2628
+ # def test_emails
2629
+ # assert_enqueued_emails 0
2630
+ # ContactMailer.welcome.deliver_later
2631
+ # assert_enqueued_emails 1
2632
+ # ContactMailer.welcome.deliver_later
2633
+ # assert_enqueued_emails 2
2634
+ # end
2635
+ #
2636
+ # If a block is passed, that block should cause the specified number of
2637
+ # emails to be enqueued.
2638
+ #
2639
+ # def test_emails_again
2640
+ # assert_enqueued_emails 1 do
2641
+ # ContactMailer.welcome.deliver_later
2642
+ # end
2643
+ #
2644
+ # assert_enqueued_emails 2 do
2645
+ # ContactMailer.welcome.deliver_later
2646
+ # ContactMailer.welcome.deliver_later
2647
+ # end
2648
+ # end
2649
+ #
2650
+ # source://actionmailer//lib/action_mailer/test_helper.rb#91
2651
+ def assert_enqueued_emails(number, &block); end
2652
+
2653
+ # Asserts that no emails have been sent.
2654
+ #
2655
+ # def test_emails
2656
+ # assert_no_emails
2657
+ # ContactMailer.welcome.deliver_now
2658
+ # assert_emails 1
2659
+ # end
2660
+ #
2661
+ # If a block is passed, that block should not cause any emails to be sent.
2662
+ #
2663
+ # def test_emails_again
2664
+ # assert_no_emails do
2665
+ # # No emails should be sent from this block
2666
+ # end
2667
+ # end
2668
+ #
2669
+ # Note: This assertion is simply a shortcut for:
2670
+ #
2671
+ # assert_emails 0, &block
2672
+ #
2673
+ # source://actionmailer//lib/action_mailer/test_helper.rb#63
2674
+ def assert_no_emails(&block); end
2675
+
2676
+ # Asserts that no emails are enqueued for later delivery.
2677
+ #
2678
+ # def test_no_emails
2679
+ # assert_no_enqueued_emails
2680
+ # ContactMailer.welcome.deliver_later
2681
+ # assert_enqueued_emails 1
2682
+ # end
2683
+ #
2684
+ # If a block is provided, it should not cause any emails to be enqueued.
2685
+ #
2686
+ # def test_no_emails
2687
+ # assert_no_enqueued_emails do
2688
+ # # No emails should be enqueued from this block
2689
+ # end
2690
+ # end
2691
+ #
2692
+ # source://actionmailer//lib/action_mailer/test_helper.rb#191
2693
+ def assert_no_enqueued_emails(&block); end
2694
+
2695
+ # Returns any emails that are sent in the block.
2696
+ #
2697
+ # def test_emails
2698
+ # emails = capture_emails do
2699
+ # ContactMailer.welcome.deliver_now
2700
+ # end
2701
+ # assert_equal "Hi there", emails.first.subject
2702
+ #
2703
+ # emails = capture_emails do
2704
+ # ContactMailer.welcome.deliver_now
2705
+ # ContactMailer.welcome.deliver_later
2706
+ # end
2707
+ # assert_equal "Hi there", emails.first.subject
2708
+ # end
2709
+ #
2710
+ # source://actionmailer//lib/action_mailer/test_helper.rb#249
2711
+ def capture_emails(&block); end
2712
+
2713
+ # Delivers all enqueued emails. If a block is given, delivers all of the emails
2714
+ # that were enqueued throughout the duration of the block. If a block is
2715
+ # not given, delivers all the enqueued emails up to this point in the test.
2716
+ #
2717
+ # def test_deliver_enqueued_emails
2718
+ # deliver_enqueued_emails do
2719
+ # ContactMailer.welcome.deliver_later
2720
+ # end
2721
+ #
2722
+ # assert_emails 1
2723
+ # end
2724
+ #
2725
+ # def test_deliver_enqueued_emails_without_block
2726
+ # ContactMailer.welcome.deliver_later
2727
+ #
2728
+ # deliver_enqueued_emails
2729
+ #
2730
+ # assert_emails 1
2731
+ # end
2732
+ #
2733
+ # If the +:queue+ option is specified,
2734
+ # then only the emails(s) enqueued to a specific queue will be performed.
2735
+ #
2736
+ # def test_deliver_enqueued_emails_with_queue
2737
+ # deliver_enqueued_emails queue: :external_mailers do
2738
+ # CustomerMailer.deliver_later_queue_name = :external_mailers
2739
+ # CustomerMailer.welcome.deliver_later # will be performed
2740
+ # EmployeeMailer.deliver_later_queue_name = :internal_mailers
2741
+ # EmployeeMailer.welcome.deliver_later # will not be performed
2742
+ # end
2743
+ #
2744
+ # assert_emails 1
2745
+ # end
2746
+ #
2747
+ # If the +:at+ option is specified, then only delivers emails enqueued to deliver
2748
+ # immediately or before the given time.
2749
+ #
2750
+ # source://actionmailer//lib/action_mailer/test_helper.rb#231
2751
+ def deliver_enqueued_emails(queue: T.unsafe(nil), at: T.unsafe(nil), &block); end
2752
+
2753
+ private
2754
+
2755
+ # source://actionmailer//lib/action_mailer/test_helper.rb#258
2756
+ def delivery_job_filter(job); end
2757
+ end
2758
+
2759
+ # source://actionmailer//lib/action_mailer/gem_version.rb#9
2760
+ module ActionMailer::VERSION; end
2761
+
2762
+ # source://actionmailer//lib/action_mailer/gem_version.rb#10
2763
+ ActionMailer::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
2764
+
2765
+ # source://actionmailer//lib/action_mailer/gem_version.rb#11
2766
+ ActionMailer::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
2767
+
2768
+ # source://actionmailer//lib/action_mailer/gem_version.rb#13
2769
+ ActionMailer::VERSION::PRE = T.let(T.unsafe(nil), T.untyped)
2770
+
2771
+ # source://actionmailer//lib/action_mailer/gem_version.rb#15
2772
+ ActionMailer::VERSION::STRING = T.let(T.unsafe(nil), String)
2773
+
2774
+ # source://actionmailer//lib/action_mailer/gem_version.rb#12
2775
+ ActionMailer::VERSION::TINY = T.let(T.unsafe(nil), Integer)