Skip to content
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

Allow custom transports for mailer component #31935

Closed

Conversation

Projects
None yet
5 participants
@ajgarlag
Copy link
Contributor

commented Jun 7, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #31385
License MIT
Doc PR TBD symfony/symfony-docs#...

This PR allows to define a custom transport for mailer component.
To enable it, set the framework.mailer.dsn key to null and the new framework.mailer.transport_id key to the transport service id you want to inject into the default mailer instance.

@kevin-verschaeve

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

I have done the same a few hours ago in #31931 :/

(but not really the same way)

@ajgarlag

This comment has been minimized.

Copy link
Contributor Author

commented Jun 7, 2019

@kevin-verschaeve Sorry, did not see your PR. I'll review it.

@nicolas-grekas nicolas-grekas added this to the next milestone Jun 7, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented Jul 8, 2019

Thanks for the PR. I think I prefer something that allows third party to implement a mailer provider with the same "feel" as built-in ones (with a proper DSN). That's what #31946 implements.

@fabpot fabpot closed this Jul 8, 2019

fabpot added a commit that referenced this pull request Jul 17, 2019

feature #31946 [Mailer] Extract transport factory and allow create cu…
…stom transports (Koc)

This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Extract transport factory and allow create custom transports

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes, failure unrelated (master hasn't this PR)
| Fixed tickets | #31385, #32523
| License       | MIT
| Doc PR        | TBD

Alternative approach to allow create custom transports and register DSN for it. Replaces #31931, #31935 . Similar to already existent TansportFactory from Messenger.

TODO:
 - [x] Update changelog
 - [x] Add more tests for factories
 - [x] Add test for configuration + DI extension

Commits
-------

5b9cded Add transport factories (closes #31385, closes #32523)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.