raow/mautic-rss-to-email-bundle

此包的最新版本(1.7.2)没有可用的许可信息。

安装数: 1,809

依赖项: 0

建议者: 0

安全性: 0

星标: 102

关注者: 12

分支: 23

开放问题: 10

类型:mautic-plugin

1.7.2 2024-02-06 08:13 UTC

README

描述

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

目的

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

兼容性

此插件已与 Mautic 版本 2.x、3.x 和 4.x 进行过测试。

功能

  • 设置要显示的帖子数量
  • 为源中的项目创建自定义模板
  • 使用源中的图片
  • 格式化日期
  • 反转视图

安装

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

使用方法

使用 froala/grapejs 电子邮件编辑器的“代码模式”槽位。在槽位内容中设置以下内容

{feed url="<<FEEDURL>>"}
    {feeditems}
        <h3>{feeditem:title}</h3>
        <p><small>{feeditem:date format="d-m-Y H:i"}</small></p>
        <p>{feeditem:description}</p>
        <p><img src="{feeditem:image}"></p>
    {/feeditems}
{/feed}

这应该为开始提供基本设置。

以下标签可以在 {feed} 块中使用

  • {feedinfo:title}
    返回:源标题

  • {feedinfo:url} 返回:源 URL

  • {feedinfo:description} 返回:源描述

以下标签可以在 {feeditems} 块中使用

可选参数

  • 批量模式

    默认情况下将启用批量模式。这意味着源标签将只在每个批次中替换一次。当您禁用批量模式时,将针对每封电子邮件解析源。因此,如果您有 1000 个地址列表,源将被请求 1000 次。由于在短时间内请求次数过多,可能会使存放源的服务器崩溃。所以请小心使用!

    {feed batch="0"} - 将禁用源的批量模式。

  • 计数
    {feeditems count="3"} - 只返回源的前 N 项

  • 偏移量
    {feeditems count="3" offset="2"} - 跳过源的前 N 项

  • 反转
    {feeditems reverse="1"} - 以反转视图返回结果

  • 随机排列
    {feeditems count="3" shuffle="1"} - 以随机(随机)视图返回结果,可以与 count 参数结合使用

合并标签

  • {feeditem:title}
    返回:帖子标题

  • {feeditem:link}
    返回:帖子的链接

  • {feeditem:content}
    返回:摘要内容(描述),当描述不可用时,将返回完整内容

  • {feeditem:content_full}
    返回:帖子的完整内容

  • {feeditem:content_text}
    返回:摘要内容(描述),当描述不可用时,将返回完整内容。标签将被移除。

  • {feeditem:content_full_text}
    返回:移除标签后的帖子完整内容

  • {feeditem:description}
    返回:帖子的摘要内容(描述)

  • {feeditem:date}
    可选参数:格式 {feeditem:date format="d-m-Y H:i"}
    返回:帖子的摘要内容(描述)

  • {feeditem:author}
    返回:帖子的作者姓名

  • {feeditem:categories}
    返回:以逗号分隔的分类列表

  • {feeditem:image}
    返回:图片 URL。将检查 xml 的封装器和媒体标签。

  • {feeditem:custom:KEY}
    返回:RSS源中自定义字段的值。

    要使用此功能,您必须

    1. 将以下内容添加到您的RSS源的xmlns定义中:xmlns:mautic="https://www.mautic.org/rss/mautic/"

      例如

      <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
       xmlns:content="http://purl.org/rss/1.0/modules/content/"
       xmlns:wfw="http://wellformedweb.org/CommentAPI/"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       xmlns:atom="http://www.w3.org/2005/Atom"
       xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
       xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
       xmlns:mautic="https://www.mautic.org/rss/mautic/">
      
      <channel>
      ...
      
    2. 使用以下语法将自定义字段添加到您的RSS源:
      <mautic:location>纽约</mautic:location>

    3. 在您的邮件模板中使用以下标签
      {feeditem:custom:location}

图标

图标由 Freepikwww.flaticon.com 制作