Template to notify of the last added message without including the previous messages

Hello community,

For days I have been trying to apply functionality to RT and I am not able to.

I want to get that when a customer writes a new correspond through an email, the system sends an automatic message to the person who has the ticket informed of the added message.

The part of sending the message is easy, it is already resolved with the templates. The problem I have is that I would like the automatic message to show only the last message added, but I can not see it shows the whole history of previous messages.

The script I add in the template is as follows:
{$Transaction->Content(Type => ‘text/html’)}

I have tried other scripts but none does what I expect …

I have installed the Extension History Filters, I have followed the indications of HideTransactions, I have tried with Set ($ QuoteFolding, 0) and Set ($ UseTransactionBatch and I tried to touch / opt / rt4 / local / plugins / RT-Extension-HistoryFilter / html / Callbacks / HistoryFilter / Ticket / Elements / ShowHistory / SkipTransaction…I have also tried copying the script from the forward message template… But I did not find the necessary configuration or the place to apply it

Could someone help me?


One issue we have in our office is the Requestors use email only. The Requestors are not aware that they are replying to a ticket & just hit “Reply” and that includes the entire message prior. Are you trying to solve that problem?

We are using this mechanism for at least 8 years now, simply by using the built-in scrip “On Correspond Notify Owner”. It does exactly what you want, if I understand your problem correctly.

Bye, Daniel

Thanks for the reply Daniel.

The problem is not the script, using the script that you tell me I got the notification correctly.

The problem is in the template. I would like that in the template only re-send the last added message, instead it includes all the history of previous messages.

The template I use is the following:

Content-Type: text/html
RT-Attach-Message: yes


El ticket del qual ets propietari amb ID {$Ticket->SubjectTag}ha rebut una resposta per part del client amb el seguent missatge:

{$Transaction->Content(Type => ‘text/html’)}


{$Ticket->OwnerObj->RealName || $Ticket->OwnerObj->Name}

With the code {$Transaction->Content(Type => ‘text/html’)} it returns me the whole message history. I want it to only include the last message added to the ticket.


Hello Xavier.

That is strange, as we use the same template code (despite we send plain text), and at our setup only the last message is returned. Which makes sense, as the content only includes the content of this transaction, which is the last message.

For us in order to include the whole history we have to use the template “Resolved”, which contains a lot of code to deliver the whole history.

Bye, Daniel

Xavier - Is part of your problem that your customers are replying with all the content in the mesage & you are trying to “filter out” only the recent reply?

@Cena_Stephen_ext_300 Yes, when the customers send a new message I get the notice with all the history of previous messages. And I just want to see the last message.

We’re having the same problem, but I’m not sure what can be done to fix it. The issue is the customer is making the error not the system.

One proposed solution I have here is to create a new HTML template to use for responses. The Template then has a link for “Click here to respond”. This link then spawns a blank email with the proper addresses and subject/queue tag. The customer hopefully would use this for replies & cutting down on the clutter. Otherwise, you would have to program a Scrip to attempt to “read” the email and discern what is the most recent “update”.

So far, the HTML Template is the “simplest” solution I’ve come up with but I haven’t had time to deploy/test it. I’m definitely interested in any solutions you may have or come up with.