How to customize attaching a message


I can not figure how to customize the behaving of RT-Attach-Message in a Template. I need something like:

{ if ($Transaction->Attachments->First->GetHeader('RT-DetectedAutoGenerated') eq ('true') ) {RT-Attach-Message: no}
 else {RT-Attach-Message: yes}    }

and so far have no success. Does anybody know? :slight_smile:
Thank you, Petr


OK, if anybody needs it, here it is. The key is not to customize the whole header but only itโ€™s content:

RT-Attach-Message: {
    if ($Transaction->Attachments->First->GetHeader('RT-DetectedAutoGenerated') eq ("true") ) {"no"}
    else {"yes"}