[rt-users] CC parsing Q?

darren chamberlain darren at boston.com
Fri Sep 6 13:43:10 EDT 2002


* Sherrill (Pei-chih) Verbrugge <spv at gospelcom.net> [2002-09-06 13:18]:
> I enable CC parsing in config.pm.  I notice that CC email addresses are
> parsed correctly only when the ticket is created.  If during the email
> thread, new email address is used in the CC field using the email client
> when sending out the email, it will not be parsed and stored in the CC
> field under the People section at the web interface.

Not a bug, but how rt-mailgate is setup.  The function
ParseCcAddressesFromHead, which does the actual parsing of addresses
from the header, is only called if rt-mailgate was unable to determine a
ticket id.

This patch might do it (untested, though); it adds another call to
ParseCcAddressesFromHead, and calls AddWatcher for each thing it finds.
Unfortunately, it had to be added twice, but hey, this is a 5 minute
hack...

(darren)

$ diff -cdw rt-mailgate.orig rt-mailgate
*** rt-mailgate.orig    Fri Sep  6 13:35:56 2002
--- rt-mailgate Fri Sep  6 13:42:37 2002
***************
*** 300,305 ****
--- 300,314 ----
                       MIMEObj => $entity
                     );
        }
+ 
+       if ($RT::ParseNewMessageForTicketCcs) {
+           my @Cc = ParseCcAddressesFromHead(Head => $head, 
+                                           CurrentUser => $CurrentUser,
+                                           QueueObj => $QueueObj );
+           for my $Cc (@Cc) {
+               $Ticket->AddWatcher($Cc);
+           }
+       }
      }
  
      # If the message is correspondence, add it to the ticket
***************
*** 318,323 ****
--- 327,341 ----
                       MIMEObj => $entity
                     );
        }
+ 
+       if ($RT::ParseNewMessageForTicketCcs) {
+           my @Cc = ParseCcAddressesFromHead(Head => $head, 
+                                           CurrentUser => $CurrentUser,
+                                           QueueObj => $QueueObj );
+           for my $Cc (@Cc) {
+               $Ticket->AddWatcher($Cc);
+           }
+       }
      }
  
      else {


-- 
Don't be ashamed to say what you are not ashamed to think.



More information about the rt-users mailing list