Skip to content

Commit

Permalink
Merge pull request #6 from AlirezaSedghi/master
Browse files Browse the repository at this point in the history
fix make new Mailer instance in laravel 7
  • Loading branch information
iwasherefirst2 authored Jun 18, 2020
2 parents 84db2e2 + 3c5f171 commit 5764e88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MultiMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ public function getMailer($key, $timeout = null, $frequency = null)

$view = app()->get('view');
$events = app()->get('events');
$mailer = new Mailer($view, $swift_mailer, $events);
$mailer = null;
if (version_compare(app()->version(), '7.0.0') >= 0) {
$mailer = new Mailer(config('app.name'), $view, $swift_mailer, $events);
} else {
$mailer = new Mailer($view, $swift_mailer, $events);
}

$mailer->alwaysFrom($config->getFromEmail(), $config->getFromName());

Expand Down

0 comments on commit 5764e88

Please sign in to comment.