A little problem with AddTicketHistoryToMail

Hi all,

we’re using AddTicketHistoryToMailhttp://requesttracker.wikia.com/wiki/AddTicketHistoryToMail , more or less verbatim, as a template for the message that gets sent to requestors on resolve.

I have a little problem with that though: if there is a transaction with a plain-text file attachment in the history, the template is sending the content of the file instead of the message (for that transaction).

How can I fix it?

Looking at the template, it seems every message is an “attachment” for RT, so how do I discriminate among a message and a real file attachment?

Thank you in advance.