CC not working when I create ticket

Hi,

First I would like to thank Arthur de Jong for a good description of RT2 ACLs
that I found on the list (from 4 April 2001).

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 ?

This is my global script configuration:

     OnCorrespond NotifyOtherRecipients with template Correspondence 
 
     OnComment NotifyOtherRecipientsAsComment with template Correspondence 
 
     OnCorrespond NotifyRequestors with template Correspondence

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

I know that is a good thing to be able to configure a lot of options, but at
the same time things have become more complex to manage in RT2 compared to
rt1. It is a nice feature allowing different actions to occure at different
events. But why would people ever like to use forms where you could add
receiptiants, but it would not work if you not have added a script for it ? It
seems a little bit unlogical for me. Why needing to add scripts in order to
make the mail forms to work ?

I really appreciate any coments that would make me wiser. I may have
missunderstood the concept.

/Cheers,

Patrick Harlin, SysAdmin
Luleå University of Technology
Sweden

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.

I got your suggestion, but this needs a script with “OnCreate
AutoReplyToRequestors with templet Autoreply”, doesn’t it ? I dont want my
requestors to get auto-replies.

But I suppose it could be added to some other file, but the question is which
one :slight_smile:

/Cheers,

Patrick

Patrick Harlin, SysAdmin
Luleå University of Technology
Sweden

I got your suggestion, but this needs a script with “OnCreate
AutoReplyToRequestors with templet Autoreply”, doesn’t it ? I
dont want my
requestors to get auto-replies.

It does need that Scrip, yes - sorry I thought you wanted that
originally but it failed for you.

But I suppose it could be added to some other file, but the
question is which
one :slight_smile:

I’m a little confused. You don’t want requestors to get OnCreate’s,
just Cc’s?

That’s a little perculiar, can’t imagine a scenario where you’d use that
:slight_smile:

If anywhere, I’d be guessing it’s the OnCreate Scrip which isn’t
gathering the Cc (or at that point the Cc isn’t available to it yet).
I’ll have a peek if I have time, but that’s going a bit further into RT
than I’d like :wink:

Andy.

I have the following scripts setup, and CC works on create and
correspond.

OnCorrespond NotifyOtherRecipients with template Correspondence
OnCorrespond NotifyAdminCcs with template Correspondence
OnCreate NotifyAdminCcs with template Correspondence
OnCorrespond NotifyRequestorsAndCcs with template Correspondence

Sherrill
Sherrill (Pei-chih) Verbrugge
http://www.gospelcom.net
http://bible.gospelcom.net
We seem to use some things more than others-our mouths more than our ears,
our stomachs more than our minds. We also seem to use the phrase “It’s so
unfair!” so much more often than “I’m so undeserving.” – AL