[rt-users] Access to Attachment structure

Emmanuel Lacour elacour at easter-eggs.com
Fri Nov 13 11:04:47 EST 2009


On Fri, Nov 13, 2009 at 05:01:47PM +0100, Alessandra Serrau wrote:
> In order to create a custom scrip, I need to access to Attachment structure
> because I would know the value of a header of the original request message.
> 
> So I try to do in custom cleanup code block:
> my $headers = $self->TransactionObj->Attachments->Headers;
> 

$self->TransactionObj->Attachments links to multiple attachements, you
have to walk them with:

while ( my $Attachment = $self->TransactionObj->Attachments->Next ) {
    my $headers = $Attachment->Headers;
}

Or use only the first one:

my $headers = $self->TransactionObj->Attachments->First->Headers;




More information about the rt-users mailing list