summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r--lib/private/Share20/Manager.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index e76269f9d86..ef926ce9883 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -714,7 +714,7 @@ class Manager implements IManager {
* @param string $initiator user ID of share sender
* @param string $shareWith email address of share receiver
* @param \DateTime|null $expiration
- * @throws \Exception If mail couldn't be sent
+ * @return bool
*/
protected function sendMailNotification(IL10N $l,
$filename,
@@ -773,7 +773,18 @@ class Manager implements IManager {
}
$message->useTemplate($emailTemplate);
- $this->mailer->send($message);
+ try {
+ $failedRecipients = $this->mailer->send($message);
+ if(!empty($failedRecipients)) {
+ $this->logger->error('Share notification mail could not be send to: ' . implode(', ', $failedRecipients));
+ return false;
+ }
+ } catch (\Exception $e) {
+ $this->logger->error('Share notification mail could not be send: ' . $e->getMessage());
+ return false;
+ }
+
+ return true;
}
/**