自定义脚本中的 Magento 邮件功能
我创建了一个自定义脚本来将大量客户导入到 magento 数据库中。客户需要的是,对于每 100 个进口客户,他们需要一封有关进口情况和状态的邮件。
那么我如何使用magento 邮件功能,以便我可以创建一个模板来像magento 一样发送邮件。请帮我
I have created a custom script to import a bulk number of customers to magento database. What client needed is for each 100 customers import they needed a mail about whats going on and status of the importing.
So how can i use the magento mailing functionality so that i can create a template to send mail as like magento does. Please help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为您正在寻找以下内容:
注意: 这是从
Mage_Sales_Model_Order::sendNewOrderEmail()
中提取的,尚未经过测试,但是它应该足以让您入门。将其视为伪代码:)I think you're looking for something along the following lines:
Note: This was lifted from
Mage_Sales_Model_Order::sendNewOrderEmail()
and hasn't been tested, but it should be more than enough to get you started. Treat it as pseudo-code :)如果您只是从导入脚本执行此操作,则 PHP mail 函数应该足够了。
If you are just doing this from an import script, the PHP mail function should be more than sufficient.
还可以执行 ZEND 的邮件功能,
这是代码,
这正是我想要的。所以可能对某些人有用。
Also can do the mailing functionality of ZEND
Here is the code
This one is working exactly what i wanted. So may be useful to some one.