app->trans('email is not valid'); } elseif ($reason == self::MAIL_FAIL) { $reason = $this->app->trans('failed to send mail'); } else { $reason = $this->app->trans('an error occured while exporting records'); } $text = $this->app->trans("The delivery to %email% failed for the following reason : %reason%", ['%email%' => $dest, '%reason%' => $reason]); $ret = [ 'text' => $text , 'class' => '' ]; return $ret; } /** * * @return string */ public function get_name() { return $this->app->trans('Email export fails'); } /** * * @return string */ public function get_description() { return $this->app->trans('Get a notification when a mail export fails'); } /** * @param integer $usr_id The id of the user to check * * @return boolean */ public function is_available(User $user) { return true; } }