Skip to content

Commit 71426d9

Browse files
authored
Merge pull request #54 from gabidj/issue-53-mail-fake-fix
Possible fix for issue #53
2 parents 7825e15 + 13cd928 commit 71426d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/HeloLaravelServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ public function register()
5151

5252
protected function bootMailable()
5353
{
54+
$managerInstance = app()->make(MailManager::class, ['app' => app()]);
5455
$instance = app()->make(Mailer::class);
5556

56-
Mail::swap($instance);
57-
57+
Mail::swap($managerInstance);
5858
$this->app->instance(MailerContract::class, $instance);
5959
}
6060

src/MailManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MailManager extends LaravelMailManager implements FactoryContract
1212
public function mailer($name = null)
1313
{
1414
if (!$name) {
15-
return $this->createLaravel9Mailer($this->app);
15+
return $this->createGeneralLaravelMailer($this->app);
1616
}
1717

1818
return $this->mailers[$name] = $this->get($name);

0 commit comments

Comments
 (0)