Different email notifications for tags is not working

I can’t not get the second part to send that messages, the Diamond tag part is working but the CCS tag is not.

**

{% capture email_title %}Thank you for your business purchase! {% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
{% assign count = 0 %}
{% for line in line_items %}
{% if line.product.tags contains “Diamond” %}
{% unless count >= 1 %}
{% assign count = count | plus: 1 %}
Your order contains a pre-order item will take 5 years. All items in this order will ship with the pre-order, based on the timing provided on the item’s product details.

{% elsif line.product.tags contains “CCS” %}
Hi {{ customer.first_name }}, we’re getting your order ready. Our current shipping/pickup time is approximately 2-3 days. We will notify you when it has been sent or is ready for pickup (along with curbside pickup time options), based on your selection.
{% endunless %}…
{% endif %}

{% endfor %}

{% endif %}
{% endcapture %}**

Hi, I see that the issue is with the structure of the conditional statements.

Try this version:

{% capture email_title %}Thank you for your business purchase!{% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
  {% assign diamond_message_shown = false %}
  {% assign ccs_message_shown = false %}
  
  {% for line in line_items %}
    {% if line.product.tags contains "Diamond" and diamond_message_shown == false %}
      Your order contains a pre-order item will take 5 years. All items in this order will ship with the pre-order, based on the timing provided on the item's product details.
      {% assign diamond_message_shown = true %}
    {% endif %}
    
    {% if line.product.tags contains "CCS" and ccs_message_shown == false %}
      Hi {{ customer.first_name }}, we're getting your order ready. Our current shipping/pickup time is approximately 2-3 days. We will notify you when it has been sent or is ready for pickup (along with curbside pickup time options), based on your selection.
      {% assign ccs_message_shown = true %}
    {% endif %}
  {% endfor %}
{% endif %}
{% endcapture %}

Thank you so much. I do have one questions is it possible to have it loop into three if > if and else … else being if they ordered both CCS and Diamond?