fix: build Mailer directly in sendTestEmail to avoid Mailer[name] not defined error
This commit is contained in:
1 parent
f471102b00
commit
9115bc9630
2 files changed
+8
-2
No files matched your search
@@ -28,6 +28,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
$this->callAfterResolving(MailManager::class, function (MailManager $manager) {
|
||||
try {
|
||||
foreach (MailAccount::all() as $account) {
|
||||
config(["mail.mailers.{$account->name}" => ['transport' => $account->name]]);
|
||||
$manager->extend($account->name, fn () => $account->buildTransport());
|
||||
}
|
||||
} catch (\Exception) {
|
||||
|
||||
Reference in new issue
Block a user