在 magento 中更改共享愿望清单邮件的发件人电子邮件地址
我想更改客户与朋友分享愿望清单时发送的共享愿望清单电子邮件的发件人电子邮件地址,我尝试将客户电子邮件作为发件人地址,将客户名称作为发件人姓名,认为可以在管理员中完成,您只需将其更改为另一个,但我想要客户电子邮件,这里需要一些帮助,
谢谢
i want to change the sender email address of the share wishlist email a customer send when share his wishlist with a friend, i'm trying to put the custmer email as the sender address, and the customer name as the from name, thought it could be done in the admin, you just can change it to another one, but i want the customer email, need some help here
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不会那样做。相反,我会将发件人地址设置为我的网上商店的地址,并将
Reply-To
标头设置为收件人朋友的地址。来自此类地址的欺骗可能会使您的电子邮件陷入垃圾邮件陷阱。I would not do it that way. Instead I would set the from address to be that of my web store and set the
Reply-To
header to be that of the recipients friend. Spoofing from addresses like that can land your email in spam traps.浏览了一下代码后,这封电子邮件似乎是从这里发送的
,所以你需要覆盖这个控制器。我从来没有做过这样的事情,但这是可行的。 这里有一个主题,如果您在谷歌上搜索“magento overridecontroller”您还会发现很多优惠信息。
之后,您必须重新实现(即复制和编辑)方法
sendAction()
。在其中是一个电话,我还认为您应该将发件人地址保留为商店的地址,因为
将其设置为其他地址可能会将邮件标记为垃圾邮件。但如果你想
只需将此调用的第二个参数更改为键为“name”的数组即可
和“电子邮件”以及所需的值。
但我强烈建议也设置 Reply-To 标头。这是可能的,因为该模型使用 Zend_Mail 对象来完成脏工作并将该对象视为单例。这意味着如果您首先创建它并配置它,则下一封邮件将使用此配置发送。在代码中,更改
为
成功
After browsing the code a bit, it would seem that this email is send from
So you need to overwrite this controller. I have never done such a thing, but it is doable. There is a topic here and if you google 'magento override controller' you'll also find a lot off info.
After that you must re-implement (meaning copy and edit) the method
sendAction()
. In it is a callI also think you should leave the sender address to that of the store, because
setting it to another address might mark the message as spam. But if you want to
do it just change the second parameter of this call to an array with keys 'name'
and 'email' and the desired values.
But I strongly advise to set the Reply-To header too. That is possible because this model uses a Zend_Mail object to do the dirty work and treats this object as a singleton. Meaning that if you create it as first and configure it, the next mail will be sent with this configuration. In code, change
to
Success