【发布时间】:2015-09-23 13:00:10
【问题描述】:
我在 magento 中创建了一个名为 vendor Complaints 的自定义模块。在这里,供应商用户可以向管理员发送关于他的投诉的邮件,管理员可以向该特定供应商用户发送回复邮件。所以我创建了 2 个不同的邮件模板,但我不知道如何同时发送。
现在我已经完成向供应商用户发送回复电子邮件,但我还没有完成向管理员用户发送邮件。
我向供应商用户发送回复邮件的代码:
/**sending email*/
$emailTemplate = Mage::getModel('core/email_template')->loadDefault('vendor_complaints_email_template');
//Getting the Store E-Mail Sender Name.
$senderName = Mage::getStoreConfig('trans_email/ident_general/name');
//Getting the Store General E-Mail.
$senderEmail = Mage::getStoreConfig('trans_email/ident_general/email');
//Variables for Confirmation Mail.
$emailTemplateVariables = array();
$emailTemplateVariables['name'] = $customerName;
$emailTemplateVariables['email'] = $customerEmail;
//Appending the Custom Variables to Template.
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
//Sending E-Mail to Customers.
$mail = Mage::getModel('core/email')
->setToName($customerName)
->setToEmail($customerEmail)
->setBody($processedTemplate)
->setSubject('ShopU Store : Vendor Complaints')
->setFromEmail($senderEmail)
->setFromName($senderName)
->setType('html');
//echo "<pre>";
//print_r($mail);
//die;
try{
//Confimation E-Mail Send
$mail->send();
}
catch(Exception $error)
{
Mage::getSingleton('core/session')->addError($error->getMessage());
return false;
}
/**end**/
谁能告诉我如何同时向管理员用户发送邮件???
提前谢谢..
【问题讨论】: