32 $this->zendMessage = new \Zend\Mail\Message();
33 $this->zendMessage->setEncoding($charset);
45 $this->messageType =
$type;
59 $body = self::createHtmlMimeFromString($body);
61 $this->zendMessage->setBody($body);
70 $this->zendMessage->setSubject($subject);
79 return $this->zendMessage->getSubject();
87 return $this->zendMessage->getBody();
95 $this->zendMessage->setFrom($fromAddress);
104 $this->zendMessage->addTo($toAddress);
113 $this->zendMessage->addCc($ccAddress);
122 $this->zendMessage->addBcc($bccAddress);
131 $this->zendMessage->setReplyTo($replyToAddress);
140 return $this->zendMessage->toString();
149 private function createHtmlMimeFromString($htmlBody)
151 $htmlPart =
new Part($htmlBody);
152 $htmlPart->setCharset($this->zendMessage->getEncoding());
153 $htmlPart->setType(Mime::TYPE_HTML);
154 $mimeMessage = new \Zend\Mime\Message();
155 $mimeMessage->addPart($htmlPart);
setReplyTo($replyToAddress)
__construct($charset='utf-8')