zendTransport = new Sendmail($parameters); $this->message = $message; } /** * @inheritdoc */ public function sendMessage() { try { $this->zendTransport->send( ZendMessage::fromString($this->message->getRawMessage()) ); } catch (\Exception $e) { throw new MailException(new Phrase($e->getMessage()), $e); } } /** * @inheritdoc */ public function getMessage() { return $this->message; } }