public function sendDigestMail(UserInterface $user, array $messages)
    {
        $template = $this->parameters['digest']['template'];
        $from = $this->parameters['digest']['from'];

        $content = $this->templating->render(
            $template,
            [
                'date' => date('Y-m-d H:i:s'),
                'messages' => $messages,
            ]
        );

        return $this->sendEmailMessage($content, $from, $user->getEmail());
    }