Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
214 views
in Technique[技术] by (71.8m points)

email - Liquid script support

I'm trying to get a liquid script to run and it doesnt seem to be working at all. The script detects if an address is cc'd in an incoming email and then launches a template.

My script looks like this

{% 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 %}

The idea is that if I receive an email to any address, and email 1 or email 2 are cc'd, I want to automatically launch my template for any cc'd adress.

I tried having a template that simply changed the email title. With all my test, the title never changed. Seems to me that either the cc's are not detected, or the template doesn't launch.

anyone has an idea?

question from:https://stackoverflow.com/questions/65873579/liquid-script-support

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

62 comments

56.7k users

...