[rt-users] Suppression of incoming mail CC to RT queue

darren chamberlain darren at boston.com
Mon Nov 18 10:13:23 EST 2002


* Smylers <smylers at gbdirect.co.uk> [2002-11-18 07:27]:
> The thing I'd try first -- as by far the least hassle from a
> techinical point of view -- would be to change the templates used so
> that people don't have these expectations.

[-- snip --]

> You just need a loop in the middle of the template to get the RealName
> and Organization for each of the requestors of the ticket.

We do something like this with our install; every autogenerated message
has a number of lines at the top, one of which is the watchers for the
ticket in question, which we generate with:

  join ", ", do {
      my @watchers;
      my %uniq;

      my $Watchers = $Ticket->Watchers;
      my $Requestors = $Ticket->Requestors;
      my $QueueWatchers = $Ticket->QueueObj->Watchers;

      while (my $requestor = $Requestors->Next) {
          my $email = $requestor->OwnerObj->EmailAddress;
          push @watchers, $email if length $email;
      }

      while (my $watcher = $Watchers->Next) {
          my $email = $watcher->OwnerObj->EmailAddress;
          push @watchers, $email if length $email;
      }

      while (my $queue_watcher = $QueueWatchers->Next) {
          my $email = $queue_watcher->OwnerObj->EmailAddress;
          push @watchers, $email if length $email;
      }

      grep { ++$uniq{$_} == 1 } @watchers;
  }

This generates a string of addresses that looks like:

  user1 at addr.ess, user2 at addr.ess, user3 at addr.ess

We stick this list in the header, which comes at the top every
message so people will be sure to see it (in theory, at least).

(darren)

-- 
The great artist and thinker are the simplifiers.



More information about the rt-users mailing list