我有一个两种语言的Magento网站,当我从后台向客户发送新密码时,他收到了一封错误语言的电子邮件,但当他从前端请求新密码时,他收到了一封正确语言的电子邮件。
如何在后台使用合适的语言(创建客户端时使用的语言)发送“忘记密码邮件”?
感谢您的帮助:)
发布于 2011-12-30 16:53:53
循序渐进
几乎忘记了,当您设置"customer configuration“时,您应该从configuration部分的左上角的"current configuration scope”中选择store (我指的是基于语言的相关store )。
发布于 2014-04-28 15:37:12
我已经设法从本地主机发送了忘记密码的电子邮件。
你唯一需要做的就是遵循下面列出的步骤,然后你就完成了。
修改此页面app/code/core/Mage/Core/Model/Email/Template.php的
注释现有功能并添加以下代码
public function getMail()
{
if (is_null($this->_mail)) {
/* changes begin */
$my_smtp_host = Mage::getStoreConfig('system/smtp/host');
$my_smtp_port = Mage::getStoreConfig('system/smtp/port');
$config = array(
'port' => $my_smtp_port,
'auth' => 'login',
'username' => 'your username',
'password' => 'your password'
);
$transport = new Zend_Mail_Transport_Smtp($my_smtp_host, $config);
Zend_Mail::setDefaultTransport($transport);
/* Changes End */
$this->_mail = new Zend_Mail('utf-8');
}
return $this->_mail;
}System -> Configuration -> Advanced -> System -> Mail Sending settings并设置以下设置。禁用电子邮件通信=否
主机= smtp.mandrillapp.com
端口(25) = 587
设置Return-Path = No

System -> Transactional Emails -> Add New Template按照以下步骤操作- In Load default template - select the required template like `'Forgot Password'` and click on the `Load Template` a default template will be be populated in the template content
- In Template Information - Provide any template name like `Forgot Password` and click on save template.
登录到管理员System -> Configuration -> Customers -> Customer Configuration -> Password Options的
- In `Forgot Email Template` select 'Forgot Password' (which was created in Transactional Emails tab) from the drop down.
- Select `Remind Email Template` to 'Forgot Password'
- Select `Forgot and Remind Email Sender` to any drop down value for ex - customer support.

注意-确保客户支持设置为某个有效的电子邮件地址。要修改客户支持电子邮件登录到管理员System -> Configuration -> General -> Store email Address -> Customer support,请添加有效的电子邮件地址。
这就是你所做的一切。请随时张贴您的问题。有关更多信息,请参阅此http://pravams.com/2011/07/30/magento-send-email-using-smtp/
https://stackoverflow.com/questions/8655332
复制相似问题