How can I add custom text to email confirmations based on SKU?

I would like to add a bit of text to the email confirmation when a customer buys a specific item by SKU.

after checking out, all items with the pitchprint app contain the word pitchprint in the SKU followed by random generated string. I want to target the consistent portion of the SKU and run HTML like in the example below.

{% when item.sku contains "pitchprint" %}

Custom Line of Text

{% endif %}

This doesn’t seem to work, any advice on the syntax or correct way to insert this?

Try this

line.variant.sku