user()->id == $recipientUser->id) { return true; } /** @var EngelsystemMailer $mailer */ $mailer = app('mailer'); $status = $mailer->sendViewTranslated( $recipientUser, $title, 'emails/mail', ['username' => $recipientUser->displayName, 'message' => $message] ); if (!$status) { error(sprintf(__('User %s could not be notified by e-mail due to an error.'), $recipientUser->displayName)); engelsystem_log(sprintf('User %s could not be notified by e-mail due to an error.', $recipientUser->name)); } return $status; }