[rt-users] ExtractCustomFieldValues with attachments.

Roy Sowa Roy.Sowa at rcmp-grc.gc.ca
Wed Jul 30 07:52:05 EDT 2008


JS,
   It is text/plain.
  Your modified version of ECFV seems to handle looping through the attachments, but misses the initial first attachment,
  The original ECFV handles the first attachment but in my case is not looping through any additional attachments to the transaction.
   I will try and merge the two versions today ( they are very different ) 
   Again thanks for your  support and interest ...

>>> Jean-Sebastien Morisset <jsmoriss at mvlan.net> 29/07/2008 4:09 pm >>>
On Tue, Jul 29, 2008 at 03:22:15PM -0400, Roy Sowa wrote:
> JS, I spoke too soon...
>  The issue now is that I extract fine from the attachment, but now if the matchstring is in the first attachment it is not found...

What's the MIME Type of your first attachment?

Line #100 might be skipping the first attachment:

    97          while (my $Message = $Attachments->Next) {
    98                  $AttachNumber++;
    99                  $RT::Logger->info("considering attachment #".$AttachNumber." of type ".$Message->ContentType);
   100                  next unless $Message->ContentType =~ m!^(text/plain|message|text$)!i;
   101                  next unless $Message->Content;

js.
-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <jsmoriss at mvlan.net>




More information about the rt-users mailing list