public function setBodyText($txt, $charset = null, $encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE) { if ($charset === null) { $charset = $this->_charset; } $mp = new Zend_Mime_Part($txt); $mp->encoding = $encoding; $mp->type = Zend_Mime::TYPE_TEXT; $mp->disposition = Zend_Mime::DISPOSITION_INLINE; $mp->charset = $charset; $this->_bodyText = $mp; return $this; }
/** * Notifies the customer of their delivery. * * @param \IocExample\Model\Customer $customer * @param \IocExample\Model\Order $order * @return void */ public function notifyCustomerOfDelivery(Customer $customer, Order $order) { $this->_mailer->setFrom('*****@*****.**', 'Grumpy Baby Orders'); $this->_mailer->setSubject('Order #' . $order->getId() . ' out for Delivery'); $this->_mailer->setBodyText('Your order is being shipped!'); $this->_mailer->addTo($customer->getEmail(), $customer->getName()); $this->_mailer->send(); }