Attachments are tied to transactions, so you have to create one anyway,
start looking from Comment method on RT::Ticket.03.07.2010 0:21 пользователь “Jason Maderios” firstname.lastname@example.org написал:
Anyone have an example of how to add an attachment to a ticket via a scrip?
The file is on the local file system to RT.
The use is to attach a PDF letter to the ticket in certain circumstances.
Another use is to attach a circuit design drawing…
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com