E-Mail Recipient Headers

When new mail arrives for a queue, ‘RT’ mails people:

OnCreate NotifyAdminCcs with template Creation
OnCreate NotifyCcs with template Creation

The AdminCcs get a mail with a To: header such as:

The Ccs get a mail with a To: header which explicitly lists all the Ccs’
e-mail addresses. This means that should a Cc reply to that mail
(depending on the mail client and exactly what the user does), the other
Ccs could be mailed directly to their personal addresses rather than
just to the ‘RT’ address.

I don’t want that to happen – I want ‘RT’ to be completely in charge of
who sees what and not have mere users getting to decide who their
e-mails go to!

I’ve found the code that makes this happen, in RT::Action::Notify in
SetRecipients(). AdminCcs get added to the Bcc: header:

if ( $arg =~ /\bAdminCc\b/ ) {
push ( @Bcc, @{ $self->TicketObj->AdminCc->Emails } );
push ( @Bcc, @{ $self->TicketObj->QueueObj->AdminCc->Emails } );
}

Ccs get added to either the To: or Cc: header:

if ( $arg =~ /\bCc\b/ ) {

  #If we have a To, make the Ccs, Ccs, otherwise, promote them to To
  if (@To) {
      push ( @Cc, @{ $self->TicketObj->Cc->Emails } );
      push ( @Cc, @{ $self->TicketObj->QueueObj->Cc->Emails } );
  }
  else {
      push ( @Cc, @{ $self->TicketObj->CcAsString } );
      push ( @To, @{ $self->TicketObj->QueueObj->Cc->Emails } );
  }

}

It looks like I can get the behaviour I want by changing the Cc code to
be like the AdminCc code.

Before I do that, I just want to check if there’s a reason why I
shouldn’t. The Cc code has obviously been carefully crafted, and I
wouldn’t like to trample all over it only to discover there’s some point
I haven’t thought of for preferring it like it is.

Cheers.

Smylers
GBdirect
http://www.gbdirect.co.uk/