Skip to content

Commit

Permalink
issue bagisto#6205
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol-Chauhan committed Apr 4, 2022
1 parent 986ee8f commit 51d6a98
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/Webkul/Admin/src/Traits/Mails.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function sendNewRefundMail($refund)
public function sendNewShipmentMail($shipment)
{
$customerLocale = $this->getLocale($shipment);

try {
if ($shipment->email_sent) {
return;
Expand Down Expand Up @@ -248,7 +248,15 @@ private function prepareMail($locale, $notification)

app()->setLocale($locale);

Mail::queue($notification);
try {
Mail::queue($notification);
} catch(\Exception $e) {
app()->setLocale($previousLocale);

\Log::error(
'prepareMail' . $e->getMessage()
);
}

app()->setLocale($previousLocale);
}
Expand Down

0 comments on commit 51d6a98

Please sign in to comment.