setSubject($subject) ->setFrom(array(MAIL_FROM => $author)) ->setBody($html, 'text/html') ->setTo(array($email => $name)); Swift_Mailer::newInstance($this->getTransport())->send($message); } catch (Swift_TransportException $e) { $this->logger->error($e->getMessage()); } } /** * Get SwiftMailer transport * * @access protected * @return \Swift_Transport */ protected function getTransport() { return Swift_MailTransport::newInstance(); } }