private function sendMessage($senderMail, $senderName, $mailhtml)
    {
        try {
            $message = $this->app['mailer']
                ->createMessage('message')
                ->setSubject('Test email from ' . $this->app['config']->get('general/sitename'))
                ->setFrom([$senderMail                   => $senderName])
                ->setReplyTo([$senderMail                => $senderName])
                ->setTo([$this->options['user']['email'] => $this->options['user']['displayname']])
                ->setBody(strip_tags($mailhtml))
                ->addPart($mailhtml, 'text/html')
            ;

            $this->app['swiftmailer.use_spool'] = false;
            if ($this->app['mailer']->send($message) > 0) {
                $this->createResult()->pass()->setMessage("Message sent to '" . $this->options['user']['email'] . "' from '" . $senderMail . "'.");
            } else {
                $this->createResult()->fail()->setMessage('No messages were able to be sent. Check your configuration.');
            }
        } catch (\Swift_TransportException $e) {
            $this->createResult()->fail()->setMessage('Swiftmailer exception')->setException($e);
        } catch (\Exception $e) {
            $this->createResult()->fail()->setMessage('PHP exception')->setException($e);
        }
    }