Use tags to change confirmation email by using if line.tags

I have read a few posts and been trying to get this to work but having an issue with displaying the correct text. My guess is I either have it in the wrong spot or missing something, or both.

We want to label some of our items with specific tags. Then if a customer orders multiple things, and one of them is using that tag, it receives either different message in their conformation email or additional message on top.

Here is what I have so far but does not seem to be correct.

{% for line in line_items %}
{% if line.tags contains ‘preorder’ %}
Special text blah blah blah.
{% endif %}
{% endfor %}

Thank you in advance for your help!

I figured it out finally.

{% for line in line_items %}
{% for tag in line.product.tags %}
{% if tag == ‘preorder’ %}
Special text blah blah blah.
{% endif %}
{% endfor %}
{% endfor %}