本文整理汇总了PHP中Mage_Core_Model_Email_Template::getMail方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Email_Template::getMail方法的具体用法?PHP Mage_Core_Model_Email_Template::getMail怎么用?PHP Mage_Core_Model_Email_Template::getMail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Email_Template
的用法示例。
在下文中一共展示了Mage_Core_Model_Email_Template::getMail方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMail
/**
* Retrieve mail object instance
*
* @return Zend_Mail
*/
public function getMail()
{
if (!Mage::getStoreConfigFlag(self::XML_PATH_ENABLED)) {
return parent::getMail();
}
if (is_null($this->_mail)) {
$this->_mail = Mage::getModel('zenc_emaillogger/zend_mail_logger');
}
return $this->_mail;
}
示例2: getMail
public function getMail($storeId = null)
{
if (is_null($this->_mail)) {
$this->_mail = parent::getMail();
$transport = $this->_getTransport($storeId);
if ($transport) {
$this->_mail->setDefaultTransport($transport);
}
}
return $this->_mail;
}
示例3: getMail
public function getMail()
{
//Check if should use Mandrill Transactional Email Service
if (FALSE === Mage::helper('mandrill')->useTransactionalService()) {
return parent::getMail();
}
if (is_null($this->_mandrill)) {
$this->_mandrill = Mage::helper('mandrill')->api();
$this->_mandrill->setApiKey(Mage::helper('mandrill')->getApiKey());
}
return $this->_mandrill;
}
示例4: loginRadiusEmail
/**
*
* @param type $subject
* @param type $message
* @param type $to
* @param type $toName
*/
public function loginRadiusEmail($subject, $message, $to, $toName)
{
$storeName = Mage::app()->getStore()->getGroup()->getName();
$mailObj = new Mage_Core_Model_Email_Template();
$mail = $mailObj->getMail();
$mail->setBodyHtml($message);
//for sending message containing html code
$mail->setFrom("Owner", $storeName);
$mail->addTo($to, $toName);
$mail->setSubject($subject);
try {
$mail->send();
} catch (Exception $ex) {
Mage::logException($ex);
}
}
示例5: getMail
/**
* @return Mandrill_Message|Zend_Mail
*/
public function getMail()
{
$storeId = Mage::app()->getStore()->getId();
if (!Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::ENABLE, $storeId)) {
return parent::getMail();
}
if ($this->_mail) {
return $this->_mail;
} else {
$storeId = Mage::app()->getStore()->getId();
Mage::helper('ebizmarts_mandrill')->log("store: {$storeId} API: " . Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId));
$this->_mail = new Mandrill_Message(Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId));
return $this->_mail;
}
}
示例6: _setReplyTo
/**
* @param Mage_Core_Model_Email_Template $mailTemplate
* @param string $replyTo
*
* @return $this
*/
protected function _setReplyTo($mailTemplate, $replyTo)
{
try {
$mailTemplate->setReplyTo($replyTo);
} catch (Exception $e) {
$mailTemplate->getMail()->setReplyTo($replyTo);
}
return $this;
}
示例7: loginRadiusEmail
public function loginRadiusEmail($subject, $message, $to, $toName)
{
$storeName = Mage::app()->getStore()->getGroup()->getName();
//$mail = new Zend_Mail('UTF-8'); //class for mail
$mailObj = new Mage_Core_Model_Email_Template();
$mail = $mailObj->getMail();
$mail->setBodyHtml($message);
//for sending message containing html code
$mail->setFrom("Owner", $storeName);
$mail->addTo($to, $toName);
//$mail->addCc($cc, $ccname); //can set cc
//$mail->addBCc($bcc, $bccname); //can set bcc
$mail->setSubject($subject);
try {
$mail->send();
} catch (Exception $ex) {
}
}