email - 液体脚本支持
问题描述
我正在尝试运行一个液体脚本,但它似乎根本不起作用。该脚本会检测收到的电子邮件中是否抄送了地址,然后启动模板。
我的脚本看起来像这样
{% assign templates = "" %}
{% for cc in ticket.ccs %}
{% if cc.email == "EMAIL 1" %}
{% assign templates = templates | append: "template-ID," %}
{% endif %}
{% if cc.email == "EMAIL_2" %}
{% assign templates = templates | append: "template-ID2," %}
{% endif %}
{% endfor %}
{% if templates != "" %}
{{ templates }}
{% else %}
Test
{% endif %}
这个想法是,如果我收到一封发往任何地址的电子邮件,并且电子邮件 1 或电子邮件 2 是抄送的,我想为任何抄送地址自动启动我的模板。
我尝试使用一个简单地更改电子邮件标题的模板。经过我所有的测试,标题从未改变。在我看来,要么没有检测到 cc,要么模板没有启动。
有人有想法吗?
解决方案
推荐阅读
- javascript - react child (found: object with keys{...} 如果您打算渲染一组子项,请改用数组。"
- reactjs - reactjs中如何从一个组件访问数据到另一个组件
- opencv - 如何在 C++ 中使用 OpenCV 4.2 计算二进制图像的周长
- php - 如何删除托管服务提供商添加到电子邮件中的促销页脚?
- springdoc - 我们可以在 Springdoc 中用 redoc 替换 swagger-ui
- javascript - 函数 ReactJS 中未定义的处理程序
- python - 使用 Jupyter 远程运行,无需在远程计算机上处理文件(脚本除外)
- python - 如何在后台运行我的应用程序 python
- sql - 找到行组之和等于给定值的第一个子集
- reactjs - React Props 不在 UI 上显示数据