Customizing a scrip to prevent too many mails

Hi list,

I have a scrip to notify the owner of any correspondence. But the owner is always an AdminCC as well since they watch all activity in the queue. So he ends up getting two mails when a requestor sends correspondence.

How can I prevent that? I was thinking of a custom condition in the scip sending emails to the AdminCC watchers to check if the owner is one of the AdminCC’s, then remove him from the recipient list. Or something to that effect?

Regards,
Danie

As far as I know if you use one notify action then module will sent only
one mail to the recipient.
Then you can add record to DB that represent action ‘Notify Owner and
AdminCc’.
Table: ScripActions
Fields:
ExecModule: Notify (or NotifyAsComment)
Argument: Owner,AdminCc
Other fields fill as you wish(see other records in table as examples).

			Best regards. Ruslan.

Danie Marais wrote:

That will work 100% Thanks a lot, Ruslan!

Danie----- Original Message -----
From: “Ruslan U. Zakirov” cubic@acronis.ru
To: “Danie Marais” danie.marais@attix5.com
Cc: rt-users@lists.bestpractical.com
Sent: Wednesday, September 08, 2004 4:18 PM
Subject: Re: [rt-users] Customizing a scrip to prevent too many mails

As far as I know if you use one notify action then module will sent only
one mail to the recipient.
Then you can add record to DB that represent action ‘Notify Owner and
AdminCc’.
Table: ScripActions
Fields:
ExecModule: Notify (or NotifyAsComment)
Argument: Owner,AdminCc
Other fields fill as you wish(see other records in table as examples).

Best regards. Ruslan.

Danie Marais wrote:

Hi list,

I have a scrip to notify the owner of any correspondence. But the owner
is always an AdminCC as well since they watch all activity in the
queue. So he ends up getting two mails when a requestor sends
correspondence.

How can I prevent that? I was thinking of a custom condition in the
scip sending emails to the AdminCC watchers to check if the owner is one
of the AdminCC’s, then remove him from the recipient list. Or something
to that effect?

Regards,
Danie



The rt-users Archives

Be sure to check out the RT wiki at http://wiki.bestpractical.com

Ruslan,

I did as you suggested and it works fine. The mail contains the owner in
the To: field and all AdminCC’s with the owner again in the Bcc: field, but
the mail server only delivers one email to the owner - even though he is in
the To and Bcc fields. Which kinda sounds like the right thing to do :slight_smile:

Thanks again for the help.

Danie

Danie Marais wrote:

Ruslan,

I did as you suggested and it works fine. The mail contains the owner
in
the To: field and all AdminCC’s with the owner again in the Bcc: field,
but
the mail server only delivers one email to the owner - even though he is
in
the To and Bcc fields. Which kinda sounds like the right thing to do :slight_smile:
This is behaviour that I expected to see.
I think this thread would be interesting for other users. May be you
want put summary into the wiki article :wink:

Sure - just tell me where to put it.

Danie

As far as I know if you use one notify action then module will sent
only one mail to the recipient.
Then you can add record to DB that represent action ‘Notify Owner and
AdminCc’.
Table: ScripActions
Fields:
ExecModule: Notify (or NotifyAsComment)
Argument: Owner,AdminCc
Other fields fill as you wish(see other records in table as examples).

This was just what I needed, too… For the feint of heart, here are
the two scripactions I added to my system. It sounds like they may be
generally useful for inclusion in RT.

insert into scripactions
(name,description,execmodule,argument,creator,created,lastupdatedby,last
updated)
values (‘Notify Owner and AdminCc’,
‘Sends mail to owner and
AdminCCs’,‘Notify’,‘Owner,AdminCc’,1,now(),1,now());

insert into scripactions
(name,description,execmodule,argument,creator,created,lastupdatedby,last
updated)
values (‘Notify Owner and AdminCc as Comment’,
‘Sends mail to owner and AdminCCs as comment’,
‘NotifyAsComment’,‘Owner,AdminCc’,1,now(),1,now());

Danie Marais wrote:

Hi list,
I have a scrip to notify the owner of any correspondence. But the
owner is always an AdminCC as well since they watch all activity in
the queue. So he ends up getting two mails when a requestor sends
correspondence.

Vivek Khera, Ph.D.
+1-301-869-4449 x806