fastware/mautic-xml-to-email-bundle

此包的最新版本(dev-main)没有可用的许可证信息。

dev-main 2021-12-22 14:17 UTC

This package is not auto-updated.

Last update: 2024-10-03 20:00:36 UTC


README

描述

Mautic XmlToEmailBundle 是一个 Mautic 插件,允许您从 XML-源生成电子邮件。

用途

发送电子邮件,例如包含您博客最新帖子的电子邮件。

兼容性

此插件已在 Mautic 版本 4.x 上进行了测试。

PHP 版本

此插件已在 PHP 7.4 和 PHP 8.0 上进行了测试。

功能

  • 为 XML 源中的条目创建自定义模板
  • 使用源中的图像
  • 与 RSS-源不同,您可以使用 XML 源中的任何属性

安装

  1. 从 github 下载插件
  2. 将/上传文件夹移动到插件目录。将文件夹命名为 MauticXmlToEmailBundle
  3. 在 Mautic GUI 中,转到齿轮,然后转到插件。
  4. 单击“安装/升级插件”按钮
  5. 现在您应该能在插件列表中看到“Xml To Email”。

使用方法

feed 标签在 grapesjs 电子邮件编辑器的文本组件(<wj-text>)或原始组件(<wj-raw>)中工作得最好。在组件内容中设置以下内容

<feed url="<<FEEDURL>>">
	<p>{feed.title}</p>
    <feeditem loop="items">
        <h3>{feeditem.title}</h3>
        <p><small>{feeditem.date}</small></p>
        <p>{feeditem.description}</p>
        <p><img src="{feeditem.image}" alt="{feeditem.title}"></p>
    </feeditem>
</feed>

这将为您提供基本的设置以开始。

您还可以在主题中使用源 - 您必须按如下方式编码它

{feed url="<<FEEDURL>>"}{feed.title}{/feed}

以下标签必须在块中使用

url

选择源 URL

以下标签必须在块中使用

loop

选择用于遍历条目的标签。值可以是空的,也可以是“root”,以从根级别读取所有条目。

示例 XML

<?xml version="1.0" encoding="UTF-8"?>
<root>
	<title>The subject of the e-mail</title>
	<items>
		<item>
			<title>Item #1</title>
			<date>2021-11-16 12:45:01</date>
			<description>The description of item #1</description>
			<image>https://www.example.com/image.png</image>
		</item>
		<item>
			<title>Item #2</title>
			<date>2021-11-17 09:21:43</date>
			<description>The description of item #2</description>
			<image>https://www.example.com/image2.png</image>
		</item>
	</items>
</root>