[rt-users] Send-email Action - how to do this?

Kevin Falcone falcone at bestpractical.com
Wed Oct 7 11:26:14 EDT 2009


On Wed, Oct 07, 2009 at 04:10:06PM +0200, Mariusz Czulada wrote:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20091007/35c0d2c0/attachment.sig>


More information about the rt-users mailing list