Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 5548c9d

Browse files
committed
Fix issue 17152 - prevent email being marked as not sent if email copy fails due to exception
1 parent 4b0750c commit 5548c9d

File tree

1 file changed

+5
-3
lines changed
  • app/code/Magento/Sales/Model/Order/Email

1 file changed

+5
-3
lines changed

app/code/Magento/Sales/Model/Order/Email/Sender.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ protected function checkAndSend(Order $order)
8181

8282
try {
8383
$sender->send();
84-
$sender->sendCopyTo();
8584
} catch (\Exception $e) {
8685
$this->logger->error($e->getMessage());
87-
8886
return false;
8987
}
90-
88+
try {
89+
$sender->sendCopyTo();
90+
} catch (\Exception $e) {
91+
$this->logger->error($e->getMessage());
92+
}
9193
return true;
9294
}
9395

0 commit comments

Comments
 (0)