private function email($subject, $body)
{
$transport = \Swift_SmtpTransport::newInstance($this->config->smtpHost, $this->config->smtpPort, $this->config->smtpEncryption);
if (!empty($this->config->smtpUser)) {
$transport->setAuthMode('login')->setUsername($this->config->smtpUser)->setPassword($this->config->smtpPassword);
}
$transport->setStreamOptions(array('ssl' => array('verify_peer' => false)));
$mailer = \Swift_Mailer::newInstance($transport);
$message = \Swift_Message::newInstance($subject)->setFrom(array($this->config->alertEmailSource))->setTo(array($this->config->alertEmailTarget))->setBody(strip_tags($body))->addPart($body, 'text/html');
return $mailer->send($message);
}