DESCRIPTION

This module should never be instantiated directly by client code. it's an internal module which should only be instantiated through exported APIs in Ticket, Queue and other similar objects.

METHODS

TransactionObj

Returns the transaction object asscoiated with this attachment.

Create

Create a new attachment. Takes a paramhash: 'Attachment' Should be a single MIME body with optional subparts 'Parent' is an optional Parent RT::Attachment object 'TransactionId' is the mandatory id of the Transaction this attachment is associated with.;

Import

Create an attachment exactly as specified in the named parameters.

Content

Returns the attachment's content. if it's base64 encoded, decode it before returning it.

OriginalContent

Returns the attachment's content as octets before RT's mangling. Currently, this just means restoring text/plain content back to its original encoding.

OriginalEncoding

Returns the attachment's original encoding.

Children

  Returns an RT::Attachments object which is preloaded with all Attachments objects with this Attachment\'s Id as their 'Parent'

NiceHeaders

Returns the To, From, Cc, Date and Subject headers.

It is a known issue that this breaks if any of these headers are not properly unfolded.

Headers

Returns this object's headers as a string. This method specifically removes the RT-Send-Bcc: header, so as to never reveal to whom RT sent a Bcc. We need to record the RT-Send-Cc and RT-Send-Bcc values so that we can actually send out mail. (The mailing rules are seperated from the ticket update code by an abstraction barrier that makes it impossible to pass this data directly

GetHeader ( 'Tag')

Returns the value of the header Tag as a string. This bypasses the weeding out done in Headers() above.

SetHeader ( 'Tag', 'Value' )

Replace or add a Header to the attachment's headers.

_Value

Takes the name of a table column. Returns its value as a string, if the user passes an ACL check