On 14 September 2013 00:19, Ruslan Zakirov <[email protected]> wrote:
> You should go other way around. After calling $template->Parse you call > $template->MIMEObj and get MIME::Entity representing result of the > template. You then can update this entity with attachments, more headers > and so on. > Hi Ruslan, Thanks for your reply. I've just tried this but now I'm wondering where I get the TicketObj and TransactionObj arguments for $template->Parse. If I use the Incident's TicketObj and TransactionObj it actually modifies the Incident's subject. I cannot put the $new_ticket->Create(…) before the $template->Parse because RT::Ticket->Create requires a MIMEObj produced by $template->Parse in $template->MIMEObj. It's a chicken vs. egg issue here I think. I must be missing something but I don't know what. I also tried putting the "my $new_ticket = RT::Ticket->new($RT::SystemUser)" above the template but leave the Create below but I'm still left with no TransactionObj to use because it's generated by RT::Ticket->Create(…). I've pasted a new version of my code at http://pastebin.com/UvnUC221. This version modifies the subject of the Incident ($self). -- Landon Stewart :: [email protected] Lead Specialist, Abuse and Security Management Spécialiste principal, gestion des abus et sécurité http://iweb.com :: +1 (888) 909-4932
-- RT Training in New York, October 8th and 9th: http://bestpractical.com/training
