[rt-users] Including email/correspond attachments in a template
Mauricio Tavares
raubvogel at gmail.com
Sun Jun 26 02:05:47 EDT 2011
Based on what I have seen on the list, I have the following template to
include the contents (correspond, email body) of the last ticket being sent:
RT-Attach-Message: yes
{ ### Get last Correspond
my $Transactions = $Ticket->Transactions;
$Transactions->Limit( FIELD => 'Type', VALUE => 'Correspond' );
$Transactions->OrderByCols (
{ FIELD => 'Created', ORDER => 'DESC' },
{ FIELD => 'id', ORDER => 'DESC' },
);
my $CorrespondObj = $Transactions->First;
if ($CorrespondObj && $CorrespondObj->Id) {
$c_content = $CorrespondObj->Content;
chomp $c_content;
}
$c_content
}
Now that takes care of the text part of the ticket, but what to do when
a given ticket has an attachment -- say, a picture -- and I would like
to keep it?
More information about the rt-users
mailing list