https://rt-wiki.bestpractical.com/index.php?title=ForwardFirstMessage&feed=atom&action=historyForwardFirstMessage - Revision history2024-03-28T15:16:13ZRevision history for this page on the wikiMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=ForwardFirstMessage&diff=1362&oldid=prevAdmin: 1 revision imported2016-04-06T20:09:05Z<p>1 revision imported</p>
<p><b>New page</b></p><div>This code effectively re-sends the original email that was sent by the requestor and which caused the ticket to be created.<br />
<br />
It's particularly useful to use it as a template when a ticket is assigned to another user ('''condition = On Owner Change; action = Notify Owner'''). For example, if your workflow includes people who will not login to RT to reply to tickets and who are not AdminCC on a queue, then this is the only way they can get the original email and reply to it.<br />
<br />
{<br />
my $Transactions = $Ticket->Transactions;<br />
$Transactions->Limit( FIELD => 'Type', VALUE => 'Create' );<br />
my $first_message;<br />
my $CreateObj = $Transactions->First;<br />
if( $CreateObj && $CreateObj->id ) {<br />
$first_message = $CreateObj->Content;<br />
}<br />
<br />
$first_message;<br />
}</div>Admin