Document action_mailer.file_settings
[ci-skip]
#50365
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Background
I was reading the Action Mailer guide and noticed the settings and defaults for the
:file
delivery method were poorly documented. These docs were originally added back in #13728. #44422 added links to the relevant sections of the Configuration guide, but did not linkconfig.action_mailer.file_settings
because the Configuration guide is actually missing that section.Detail
I added a short section to the Configuration guide for
config.action_mailer.file_settings
and linked to it from the Action Mailer guide, following the style of the other delivery methods. Like other delivery methods, the relevant options forfile_settings
come from the allowed options of theMail::FileDelivery
class in the mail gem.Additional information
Here's where Rails sets up this delivery method with the default location:
rails/actionmailer/lib/action_mailer/delivery_methods.rb
Lines 30 to 31 in 9064735
And here's where the mail gem uses the options:
https://github.com/mikel/mail/blob/10a4443b9d4ffa71b9ad643ad86cc23ccc99f0f3/lib/mail/network/delivery_methods/file_delivery.rb#L21
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]