[rt-users] CC not working when I create ticket...

Andy Coates andy at bribed.net
Wed Aug 28 06:06:39 EDT 2002


> Hi,
[snip] 
> I'v got problems with my scipts. I would like all CCs (and 
> bcc, admin CC, and 
> all other receipiants) to receive mail, when I address them. 
> It works when I 
> comment things, but not when I am creating a ticket ?

I had the same problem, and without searching through thousands of lines
of code I modified AutoReply.pm to simply add the CC field.

> I have also tried to add "OnCreate 
> NotifyOtherRecipientsAsComment with 
> template Correspondence", but the CCs still not get the mail ?

I tried that too, I'm guessing it doesn't parse the CC at that point for
whatever reason.

This is the hack I came up with, and it works, so I'm not complaining.
Whether it's the right place or the right way to do it is something I'll
leave others who know more about it to comment on (first time I've
touched the RT source).

If you look in the RT directory /usr/rt/lib/RT/Action (in my setup,
might be different prefix for yours), you'll see a file called
AutoReply.pm

On line 21 you'll see something along the lines of:

push(@{$self->{'To'}}, @{$self->TicketObj->Requestors->Emails});

Simply add this line on the next line:

push(@{$self->{'Cc'}}, @{$self->TicketObj->Cc->Emails});

So you end up with:

push(@{$self->{'To'}}, @{$self->TicketObj->Requestors->Emails});
push(@{$self->{'Cc'}}, @{$self->TicketObj->Cc->Emails});

As you can see, its pretty obvious what its doing, just adding the
people listed in the Cc of the ticket to the Cc of the autoreply.

Hopefully that's the right way of doing it, and hopefully you can read
the above.  If for whatever reason it doesn't work I can supply my
modified AutoReply.pm

See if it works and drop me a mail - be interesting to see if this works
for anyone else or if there's some flaw in that which could be fixed.

Andy.




More information about the rt-users mailing list