mhonarc-users

RE: removing subject header (+another question)

1998-06-15 17:38:56
Thanks, Simeon, I've tried it and it works well!

Here's the original code from mhamail.pl (starting at line 832)

   ##-------------##
   ## Get Subject ##
   ##-------------##
   if ($fields{'subject'} !~ /^\s*$/) {
      ($sub = $fields{'subject'}) =~ s/\s*$//;
   } else {
      $sub = 'No Subject';
   }

You could add a couple of lines after the 
 
  ($sub = $fields{'subject'}) =~ s/\s*$//;

as follows:

   ##-------------##
   ## Get Subject ##
   ##-------------##
   if ($fields{'subject'} !~ /^\s*$/) {
      ($sub = $fields{'subject'}) =~ s/\s*$//;
     $tag = 'string to be removed';
     $pat = quotemeta $tag;
     $sub =~ s/$pat//;
   } else {
      $sub = 'No Subject';
   }


<Prev in Thread] Current Thread [Next in Thread>