Answer the question
In order to leave comments, you need to log in
How to make a dynamic mail driver change?
The user must choose with the help of which service to send the mailing list. For example, there are two drivers, written in-house and Amazon SES. How can I handle this in code so that the driver changes depending on the user's choice?
Answer the question
In order to leave comments, you need to log in
By and large, the user absolutely does not care what service the mail will be sent with. I think so.
I suggest you make your drivers as system components, when adding a new driver, wrap it in a wrapper class, hook all the necessary classes to the application itself, and call the one that fits in the right situation, you will find all the necessary information on the link .
In addition, it is possible to initialize components only when they are called, i.e. when the application starts, they will not be initialized, but only at the time of the call.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question