[rt-users] Problem with attachments

Guadagnino Cristiano guadagnino.cristiano at creval.it
Fri Feb 6 12:49:43 EST 2015


Jeff, thank you for your reply.

My templates have not been varied in the last couple of years.
Anyway, here is my "correspondence" template (which is working):

> Content-Type: text/html
> RT-Attach-Message: yes
> From: {
>   my $u = $Transaction->CreatorObj;
>   my $a = $Ticket->QueueObj->CorrespondAddress;
>   $a = $Ticket->QueueObj->CommentAddress if ( $Transaction->Type eq 
> 'Comment' );
>   my $res = $u->RealName || $u->Name;
>   $res .= " <".$a .">" ;
> $res; }
>
>
> {$Transaction->Content()}

And here is (part of) my "resolved" template, which suddenly is not 
working anymore (i.e. files are not attached):

> Content-Type: text/html
> RT-Attach-Message: yes
> Subject: {$Ticket->Subject}
>
> <h2>Risoluzione:</h2></a>
> <p>
> {
>  my $Transactions = $Ticket->Transactions;
>  $Transactions->Limit( FIELD => 'Type', VALUE => 'Comment' );
>  $Transactions->OrderByCols (
>                { FIELD => 'Created',  ORDER => 'DESC' },
>                { FIELD => 'id',     ORDER => 'DESC' },
>                );
>
>  my $resolution_comment;
>  my $CommentObj = $Transactions->First;
>  if( $CommentObj && $CommentObj->id ) {
>    $resolution_comment = $CommentObj->Content;
>  }
>
>  $resolution_comment;
> }
>
> (...)

Thank you in advance.

Cris



On 06/02/2015 13:06, Jeff Voskamp wrote:
> "Magic headers" need to be in the first paragraph.
> If the first line is blank remove it.  Make sure there is a blank line 
> after RT-Send-Attachment and before the main template.




More information about the rt-users mailing list