I have below requirement in laravel application:
I have multiple mail services like Mandril, amazon ses etc.. integrated in my application. And I have multiple clients, each client is configured with one of the mail services with valid credentials in the database.
I would like to provide a api to the clients, so that they can access the application with valid credentials and hit the api with the valid email content.
I need to fetch the mail configurations based on the client and send an email to the sender and log the mail stats into the database.
Right now, while I am trying to implment this, I need to load the mailserver credentials in the laravel config, whenever I tried to send mail via the application using the different mail server cerdentials the overriding of the config is not working as expected.
Note: Whenever I clear the config, then the changes are reflected.
Kindly let me know if there is any possible solution to this.