Send-email Action - how to do this?

Hi all,

As adwised in Wiki, I implemented my workflow with “STATE” ticked field
(readonly for users) and “ACTION” transaction fields (fields, because
each of my 5 user groups has a different role in the process).

I created a few scrips, which verify if “ACTION” is valid for this group
and the current “STATE”, and also check if RT Status changes go with
“STATE” value.

Depending on RT Status, STATE and ACTION, I’d like to send an email
notification to different “set of recipients”. On some actions there
will be [members of] groups L1 and L4, on others L1, L3 and L4,
sometimes L5 only. So I can’t assign groups do queue’s Watchers and
AdminWathers - for me 3 combinations of them is just not enough. Also
adding one-time [B]CCs in transaction is not an option (assume users
will often forget about it).

I was thinking about sending emails “by hand” from scrip action. I was
thinking about such solution:

Condition: User defined
Action: User defined
Template: My notification template

Custom condition:
if (my_verification_of_action_is_positive) {
return 1;
} else {
return 0;
}

Custom action preparation code:
do_some_FIELD_modifications_as_needed;
SendNotification(To => EmailAdressesOfUsersInGroups((“L1”,“L2”)),
Cc => (EmailAdressesOfUsersInGroups((“L4”)),
EmailAddressOfRequestors));

Can sb help me about how to implement such actions? Im not good in perl
object programming.

Also, any other suggestion about notification is also welcome. Just
notice, that three combinations of “groups” built in RT (Watchers,
AdminWatchers, Watchers+AdminWatchers) are not enouch, since I’ll need
some 12+ combinations of L1…L5 groups in CC or BCC roles.

Thank you in advance for your help and suggesions,

Regards,

Mariusz Czu�ada

Wygraj wymarzony skuter!
Wyznacz najprostszďż˝ drogďż˝ - docelu.pl - Kliknij:

I was thinking about sending emails “by hand” from scrip action. I was
thinking about such solution:

Condition: User defined
Action: User defined
Template: My notification template

Custom condition:
if (my_verification_of_action_is_positive) {
return 1;
} else {
return 0;
}

Custom action preparation code:
do_some_FIELD_modifications_as_needed;
SendNotification(To => EmailAdressesOfUsersInGroups((“L1”,“L2”)),
Cc => (EmailAdressesOfUsersInGroups((“L4”)),
EmailAddressOfRequestors));

Can sb help me about how to implement such actions? Im not good in perl
object programming.

Also, any other suggestion about notification is also welcome. Just
notice, that three combinations of “groups” built in RT (Watchers,
AdminWatchers, Watchers+AdminWatchers) are not enouch, since I’ll need
some 12+ combinations of L1…L5 groups in CC or BCC roles.

The two simplest solutions would be to have a template for each
notifications that contains the addresses you want to notify or you
can use Rt-Action-NotifyGroups (built into RT 3.8).
sbin/rt-email-group-admin shows how to create group notification
Actions that you can then use.

You can also write perl code in your action to subclass RT::Action::Notify

-kevin