setSubject($subject) ->setFrom(array($this->helper->mail->getMailSenderAddress() => $author)) ->setTo(array($email => $name)) ->setBody($html, 'text/html'); 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(); } }