-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
There is no way configure mailer component without using message bus #34633
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
Comments
@voodooism looking at the linked code I can see that the message bus is optional and the messages is sent immediately if no message bus is provided. https://github.com/symfony/mailer/blob/a2e19255ce8de3a9c4e5228fde33ca9390af787c/Mailer.php#L35-L41 |
@mhujer Yes, you are absolutely right. But, I have I can propose to add a configuration to mailer component. Something like that:
|
I had added the pull request with my propose. I did pull request first time in the Symfony repository, so let me know if something is wrong. Any feedback |
… to use (ogizanagi) This PR was merged into the 5.1-dev branch. Discussion ---------- [Mailer] Allow to configure or disable the message bus to use | Q | A | ------------- | --- | Branch? | master <!-- see below --> | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | #34633 <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | todo A new `mailer.message_bus` option allowing to choose the message bus to use instead of using the default one. Also allows to set it to `false` so no message bus is used and the transport will be called directly. Commits ------- 42fd0cf [Mailer] Allow to configure or disable the message bus to use
…ble the message bus to use (jschaedl, fabpot) This PR was merged into the 6.3 branch. Discussion ---------- [FrameworkBundle][Notifier] Allow to configure or disable the message bus to use | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | tbd <!-- required for new features --> For the mailer integration there is already a possibility to disable or configure the `message_bus` to use. See: #34633 and #34648 This PR introduces a similar config option `notifier.message_bus` for the notifier integration. Things done: - [x] Add a config option `notifier.message_bus` for the notifier configuration - [x] Adjust FrameworkExtension considering the new `message_bus` config option - [x] Add tests for the new config option Commits ------- fc7aaa6 Fix logic and tests 215e802 Allow to configure or disable the message bus to use
…ble the message bus to use (jschaedl, fabpot) This PR was merged into the 6.3 branch. Discussion ---------- [FrameworkBundle][Notifier] Allow to configure or disable the message bus to use | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | tbd <!-- required for new features --> For the mailer integration there is already a possibility to disable or configure the `message_bus` to use. See: symfony/symfony#34633 and symfony/symfony#34648 This PR introduces a similar config option `notifier.message_bus` for the notifier integration. Things done: - [x] Add a config option `notifier.message_bus` for the notifier configuration - [x] Adjust FrameworkExtension considering the new `message_bus` config option - [x] Add tests for the new config option Commits ------- fc7aaa6123 Fix logic and tests 215e802741 Allow to configure or disable the message bus to use
…ble the message bus to use (jschaedl, fabpot) This PR was merged into the 6.3 branch. Discussion ---------- [FrameworkBundle][Notifier] Allow to configure or disable the message bus to use | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | tbd <!-- required for new features --> For the mailer integration there is already a possibility to disable or configure the `message_bus` to use. See: symfony/symfony#34633 and symfony/symfony#34648 This PR introduces a similar config option `notifier.message_bus` for the notifier integration. Things done: - [x] Add a config option `notifier.message_bus` for the notifier configuration - [x] Adjust FrameworkExtension considering the new `message_bus` config option - [x] Add tests for the new config option Commits ------- fc7aaa6123 Fix logic and tests 215e802741 Allow to configure or disable the message bus to use
Symfony version(s) affected: 4.3.8
Description
There is no way to configure the mailer component without a bus. If I have the messenger component in my app mailer automatically works via bus. But I want to send a message instantly without using a message bus
https://github.com/symfony/mailer/blob/4.3/Mailer.php#L29
Possible Solution
Maybe it is a good idea to add the ability to configure this?
The text was updated successfully, but these errors were encountered: