Magento 邮件模板以及发送邮件细节
来源:互联网 发布:xps 转换 知乎 编辑:程序博客网 时间:2024/05/17 01:46
用户注册后是否需要邮件验证,如果需要的话用户注册的邮件没有发送成功,那么这个用户是无法LOGIN的,以下为设置部分:
system->configure->customers-customer configuration->create new account options这个里的Require Emails Confirmation 为No
邮件的实现过程:
拿order为例:
app/code/core/Mage/Sales/Model/Order.php
sendNewOrderEmail
$mailTemplate = Mage::getModel('core/email_template');
$template = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $this->getStoreId());
->sendTransactional()
app/code/core/Mage/Core/Model/Email/Template.php
sendTransactional(){
$this->load($templateId);
}
//Load的时候进行了邮件subject的设置
$templateText = Mage::app()->getTranslator()->getTemplateFile(
$data['file'], 'email', $locale
);
if (preg_match('/<!--@subject/s*(.*?)/s*@-->/', $templateText, $matches)) {
$this->setTemplateSubject($matches[1]);
//这个东西就在邮件模板的html文件中是:<!--@subject Welcome, {{var customer.name}}! @-->
$templateText = str_replace($matches[0], '', $templateText);
}
/**
* Remove comment lines
*/
$templateText = preg_replace('#/{/*.*/*/}#suU', '', $templateText);
$this->setTemplateText($templateText);
$this->setId($templateId);
而邮件的模板的定义是在:/app/code/core/Mage/Sales/etc/config.xml
<sales_email>
<order>
<enabled>1</enabled>
<template>sales_email_order_template</template>
<guest_template>sales_email_order_guest_template</guest_template>
<identity>sales</identity>
<copy_method>bcc</copy_method>
</order>
实际上这些文件在
app/locale/en_US/template/email/里
- Magento 邮件模板以及发送邮件细节
- magento发送邮件机制
- Magento 发送邮件代码(使用数据库中模板)
- magento email:发送自定义邮件
- Magento邮件发送完美设置
- magento 设置smtp发送邮件
- magento email:发送自定义邮件
- magento发送自定义邮件功能
- 如何修改Magento邮件模板
- spring 邮件 发送模板
- python发送邮件模板
- python 邮件发送模板
- 使用JavaMail实现发送模板邮件以及保存到发件箱
- magento 发送邮件,通过magento的机制发送邮件 - magento send custom email
- magento email:快速实现发送自定义邮件
- magento email:快速实现发送自定义邮件
- magento 开发 -- 用户自定义发送邮件
- Magento Zend framework通过smtp发送邮件
- C语言POSIX线程常用函数
- 项目开发 - 数据字典
- 项目开发 - 权限权限管理系统
- 关于VS2010帮助文档默认保存路径的修改
- Magento模板的垂直菜单生成
- Magento 邮件模板以及发送邮件细节
- Magento PAYPAL支付方式研究
- Magento的pending订单在用户账户中不显示的解决办法
- Magento的checkout onepage下单时的必选字段修改成可选字段
- a
- Winform 弹出窗体 - 显示特效
- 123456
- 网站安全应用小技巧:防范被挂马!
- 文件系统和文件输入输出