Example #1
0
 /**
  * @covers Mage_Core_Model_Email_Template::send
  * @covers Mage_Core_Model_Email_Template::addBcc
  * @covers Mage_Core_Model_Email_Template::setReturnPath
  * @covers Mage_Core_Model_Email_Template::setReplyTo
  */
 public function testSend()
 {
     $this->_mail->expects($this->exactly(2))->method('send');
     $this->_mail->expects($this->once())->method('addBcc')->with('*****@*****.**');
     $this->_mail->expects($this->once())->method('setReturnPath')->with('*****@*****.**');
     $this->_mail->expects($this->once())->method('setReplyTo')->with('*****@*****.**');
     $this->_model->addBcc('*****@*****.**')->setReturnPath('*****@*****.**')->setReplyTo('*****@*****.**');
     $this->assertNull($this->_model->getSendingException());
     $this->assertTrue($this->_model->send('*****@*****.**'));
     $this->assertNull($this->_model->getSendingException());
     // send once again to make sure bcc, return path and reply-to were not invoked second time
     $this->assertTrue($this->_model->send('*****@*****.**'));
 }
Example #2
0
 /**
  * Add BCC emails to list to send.
  *
  * @return Ebizmarts_Mandrill_Model_Email_Template
  */
 public function addBcc($bcc)
 {
     $helper = Mage::helper('mandrill');
     if (FALSE === $helper->useTransactionalService()) {
         return parent::addBcc($bcc);
     }
     if (is_array($bcc)) {
         foreach ($bcc as $email) {
             $this->_bcc[] = $email;
         }
     } elseif ($bcc) {
         $this->_bcc[] = $bcc;
     }
     return $this;
 }
Example #3
0
 public function addBcc($bcc)
 {
     if (is_array($bcc)) {
         foreach ($bcc as $email) {
             $this->getSentEmailModel()->addBccReceipient($email);
         }
     } elseif ($bcc) {
         $this->getSentEmailModel()->addBccReceipient($bcc);
     }
     return parent::addBcc($bcc);
 }
Example #4
0
 /**
  * @param Mage_Core_Model_Email_Template $mailTemplate
  * @param mixed $store
  *
  * @return $this
  */
 protected function _setCarbonCopy($mailTemplate, $store)
 {
     $copyTo = Mage::helper('aw_hdu3/config')->getCarbonCopyRecipientEmail($store);
     if (!empty($copyTo)) {
         $mailTemplate->addBcc($copyTo);
     }
     return $this;
 }
 public function addBcc($bcc)
 {
     $this->bcc = $bcc;
     return parent::addBcc($bcc);
 }