diff --git a/app/Jobs/Util/StartMigration.php b/app/Jobs/Util/StartMigration.php index 4111cc967b..3950efb54a 100644 --- a/app/Jobs/Util/StartMigration.php +++ b/app/Jobs/Util/StartMigration.php @@ -139,7 +139,7 @@ class StartMigration implements ShouldQueue $this->company->update_products = $update_product_flag; $this->company->save(); - Mail::to($this->user->email, $this->user->name())->send(new MigrationFailed($e, $e->getMessage())); + Mail::to($this->user->email, $this->user->name())->send(new MigrationFailed($e, $e->getMessage(), $this->company->settings)); if (app()->environment() !== 'production') { info($e->getMessage()); diff --git a/app/Mail/MigrationFailed.php b/app/Mail/MigrationFailed.php index 562b515051..423200ad10 100644 --- a/app/Mail/MigrationFailed.php +++ b/app/Mail/MigrationFailed.php @@ -12,14 +12,14 @@ class MigrationFailed extends Mailable public $exception; public $content; - + public $settings; /** * Create a new message instance. * * @param $content * @param $exception */ - public function __construct($exception, $content = null) + public function __construct($exception, $content = null, $setings) { $this->exception = $exception; $this->content = $content; @@ -33,6 +33,7 @@ class MigrationFailed extends Mailable public function build() { return $this->from(config('mail.from.address'), config('mail.from.name')) - ->view('email.migration.failed'); + ->view('email.migration.failed',['settings' => $this->settings]) + ->with(); } }