Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Mailer] Add custom transport factories #16373

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

Merged
merged 1 commit into from
Jan 18, 2024
Merged

Conversation

AlbertMorenoDEV
Copy link
Contributor

@AlbertMorenoDEV AlbertMorenoDEV commented Jan 5, 2022

This might be useful for very custom use cases where we need to extract some data or do something before being able to create the actual transport.

The feature apparently was added here: symfony/symfony#31946

@carsonbot carsonbot added this to the 4.4 milestone Jan 5, 2022
@AlbertMorenoDEV AlbertMorenoDEV changed the title Add Custom Transport Factories Add custom transport factories to Mailer documentation Jan 5, 2022
@AlbertMorenoDEV AlbertMorenoDEV changed the title Add custom transport factories to Mailer documentation [Mailer] Add custom transport factories Jan 7, 2022
@ilohpro
Copy link

ilohpro commented Feb 22, 2022

Hi,
Is it possible to show how to use custom transport factory by loading the dsn from a property of the current user requesting Symfony ?
This should also be very usefull .
Thank you

@AlbertMorenoDEV
Copy link
Contributor Author

Hello,

Does a transport gets created in every request? Just wondering because not sure how good would be doing that 🤔

Could you elaborate on a specific example?

Cheers

@javiereguiluz javiereguiluz changed the base branch from 4.4 to 5.4 January 18, 2024 12:42
@javiereguiluz javiereguiluz merged commit dcc3404 into symfony:5.4 Jan 18, 2024
@javiereguiluz
Copy link
Member

Albert, we finally merged your contribution. Sorry it took us so long. Also, congrats on your first Symfony Docs contribution 🎉

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.

4 participants