Skip to content

Allow custom transports for mailer component #31935

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

Closed

Conversation

ajgarlag
Copy link
Contributor

@ajgarlag ajgarlag 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
Copy link
Contributor

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

(but not really the same way)

@ajgarlag
Copy link
Contributor Author

ajgarlag commented Jun 7, 2019

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

@fabpot
Copy link
Member

fabpot 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
…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)
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants