[rt-users] Creating ticket with Attachment using Perl APIs (4.0.2)

Thomas Sibley trs at bestpractical.com
Mon Oct 17 14:03:21 EDT 2011

On 10/17/2011 01:47 PM, Srikumar Nair wrote:
> I am trying to create a ticket with attachment thru the Perl APIs.
> I don't see a method in the RT::Ticket API for adding attachment during
> ticket creation.
> When looking at the RT::Attachment API it says "This module should never
> be instantiated directly by client code. it's an internal module which
> should only be instantiated through exported APIs".
> So wondering how I can create a ticket with attachment.

You need to construct a MIME entity and pass it in as the MIMEObj 
argument.  There is a not terribly simple example of this in 
CreateTicket in RT::Interface::Web.


More information about the rt-users mailing list