setSubject($subject) ->setFrom(array($this->helper->mail->getMailSenderAddress() => $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|\Swift_MailTransport|\Swift_SmtpTransport|\Swift_SendmailTransport */ protected function getTransport() { return Swift_MailTransport::newInstance(); } }