So that new config isnt reading from the .env or ? It seems all values are hardcoded
Using Mail::mailer() still sending from default mailer
We recently started up a new project using laravel 9. For a specific controller we want to send mails from a different mail config than specified in .env file. Per docs this should be as easy as using Mail::mailer('custommailconfig')->to('[email protected]')->send(new SampleMail());
We added the new config to the config/mail.php to the mailers array 'custommailconfig' => [ 'transport' => 'smtp', 'host' => 'host', 'port' => port, 'encryption' => 'ssl', 'username' => 'username', 'password' => 'password', 'timeout' => null, 'local_domain' => env('MAIL_EHLO_DOMAIN') ]
however, the default mailer is still used alongside the credentials set in .env. I did php artisan config:clear and cache:clear and restarted the server
Please or to participate in this conversation.