如何使用shopware 6中的模板通过插件发送邮件
我创建了一个插件,我想在其中向客户发送邮件。
使用电子邮件模板真的很方便,因为它们可以在管理面板中编辑。这里的问题是电子邮件模板需要一个类型,而我找不到通用类型,只能找到特定的类型。
我应该创建自己的电子邮件模板类型吗?或者还有其他使用模板的方法吗?我必须在没有模板的情况下完成吗?
I created a plugin in which I would like to send a Mail to a customer.
It would be really convenient to use the email templates, since they are editable in the admin panel. The problem here is that the email templates need a type and I could not find a generic type, but only specific ones.
Should I create my own email template type? Or is there another way to use a template? Do I have to do it without Templates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要添加新类型的电子邮件模板(然后可以在管理面板中选择),您必须使用迁移。请参阅此处查看示例。
然后您可以使用教程中“Shopware 6 的高级电子邮件服务”部分中的描述来触发邮件。
To add a new type of email template which you can then select in the admin panel, you have to use a migration. See here for an example.
Then you can use the description in the section "An advanced email service for Shopware 6" in the tutorial to trigger the mail.