-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe configuration behaviour with multiple mailers #5724
Conversation
|
||
The configuration in the ``swiftmailer`` key (see above) is a shortcut | ||
syntax for the default mailer. If you use multiple mailers, you need to | ||
set options like ``disable_delivery`` separately for the additional mailers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reword this a bit:
.. caution::
When configuring multiple mailers, options must be placed under the appropriate
mailer key of the configuration. Options placed directly under the `swiftmailer`
key will not be applied to all mailers, but will configure a mailer named
``default`` instead.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Christian, I think your wording sounds great and explains the issue well.
If i interpret the configuration code correctly, the default mailer doesn't have to be named default
, but it has to be configured as default_mailer
.
Edit: Oh, seems like it simply uses the name default
regardless of the configured default_mailer
- This surprised me again 😄
I'll push a new commit to my PR which contains your rewording.
Thanks @xelan for making the documentation better! I have left just one minor suggestion. What do you think about it? |
👍 |
1 similar comment
👍 |
Hm, looking at the code again I think this only true if you do not change the default mailer using the @stof What do you think? |
@xabbuh using the shorthand syntax in multiple files with a non-default name for the mailer indeed works only if you redefine the name in all files (the same is true for Doctrine shortcuts btw). |
…(xelan) This PR was squashed before being merged into the 2.3 branch (closes #5724). Discussion ---------- Describe configuration behaviour with multiple mailers | Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes | Applies to | all | Fixed tickets | symfony/swiftmailer-bundle#111 This PR describes the behaviour when multiple mailers are configured. Commits ------- 887e8ba Describe configuration behaviour with multiple mailers
This PR describes the behaviour when multiple mailers are configured.