本文整理汇总了PHP中Mage_Core_Model_Email_Template::addBcc方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Email_Template::addBcc方法的具体用法?PHP Mage_Core_Model_Email_Template::addBcc怎么用?PHP Mage_Core_Model_Email_Template::addBcc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Email_Template
的用法示例。
在下文中一共展示了Mage_Core_Model_Email_Template::addBcc方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSend
/**
* @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('bcc@example.com');
$this->_mail->expects($this->once())->method('setReturnPath')->with('return@example.com');
$this->_mail->expects($this->once())->method('setReplyTo')->with('replyto@example.com');
$this->_model->addBcc('bcc@example.com')->setReturnPath('return@example.com')->setReplyTo('replyto@example.com');
$this->assertNull($this->_model->getSendingException());
$this->assertTrue($this->_model->send('test@example.com'));
$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('test@example.com'));
}
示例2: addBcc
/**
* 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;
}
示例3: addBcc
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);
}
示例4: _setCarbonCopy
/**
* @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;
}
示例5: addBcc
public function addBcc($bcc)
{
$this->bcc = $bcc;
return parent::addBcc($bcc);
}