[rt-users] Changing mail content in action module

Ruslan Zakirov ruslan.zakirov at gmail.com
Wed May 13 07:27:38 EDT 2009


On Tue, May 12, 2009 at 7:32 PM, Bastian Ballmann <ballmann at patronas.de> wrote:
> Hi list,
>
> I've programmed my own action module to create tickets from
> forwarded mails.
>
> Therefore I scan from and subject headers in all attachments
> and set the ticket's requestor to the original mail from and the
> subject to the original subject.
>
> Now I would like to also set the tickets content to the
> original content of the forwarded mail but I cannot find
> a way to do so.
>
> I have to set the $Transaction->Content before applying
> the template "Autoreply" and I know the Prepare method
> must be overwritten to do so, but if I change
> $self->TransactionObj->{'message'}->{'items'}->[0]->{'values'}->{'content'}
> it wont have any effect and I cannot find a set-method for
> the property Content of the transaction object.
>
> Any hint / advice?
> Greets & have a nice day! :)

If you create a new ticket then you should pass MIME object to Create
method in RT::Ticket. The same applies to transactions. You should
provide everything you need during create, actually creating
transactions manually is not good choice cuz they are created
automatically when you change a ticket using its methods.

>
> Basti
>
> --
> Bastian Ballmann


-- 
Best regards, Ruslan.



More information about the rt-users mailing list