private function sendToEmails(array $files)
    {
        $config = $this->getEmailConfig();

        $mailer = new \Swift_Mailer($config['transport']);

        $message = (new \Swift_Message())
            ->setSubject($config['subject'])
            ->setFrom($config['from'])
            ->setTo($this->emailTo)
            ->setBody($config['body'])
            ->addPart('<q>Cronjob output attached</q>', 'text/html');

        foreach ($files as $filename) {
            $message->attach(\Swift_Attachment::fromPath($filename));
        }

        $mailer->send($message);
    }