Changing mail content in action module

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! :slight_smile:

Basti

Bastian Ballmann

PATRONAS Financial Systems GmbH
Schnewlinstr 4
79098 Freiburg

fon +49 (0)761 400688-19
fax +49 (0)761 400688-50

ballmann@patronas.de
http://www.patronas.de

Amtsgericht Freiburg, HRB 7212
Geschï¿œftsfï¿œhrung: Heribert Steuer, Carsten Osswald

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

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! :slight_smile:

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.

Hi!

Ruslan Zakirov schrieb:> On Tue, May 12, 2009 at 7:32 PM, Bastian Ballmann ballmann@patronas.de wrote:

If you create a new ticket
I dont create a new ticket or transaction. I want to modify
an existing ticket before template is applied and change
it’s content.

Greets & a sunny day :slight_smile:

Basti

Bastian Ballmann

PATRONAS Financial Systems GmbH
Schnewlinstr 4
79098 Freiburg

fon +49 (0)761 400688-19
fax +49 (0)761 400688-50

ballmann@patronas.de
http://www.patronas.de

Amtsgericht Freiburg, HRB 7212
Geschäftsführung: Heribert Steuer, Carsten Osswald

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.