[Rt-commit] r5261 -
RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter
ruz at bestpractical.com
ruz at bestpractical.com
Fri May 19 13:15:59 EDT 2006
Author: ruz
Date: Fri May 19 13:15:59 2006
New Revision: 5261
Modified:
RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm
Log:
* correct looking for part
** check bodyhandle, could be undef
** stringfy_body returns encoded content, we need unencoded so use $bodyhandle->as_string
Modified: RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm
==============================================================================
--- RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm (original)
+++ RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm Fri May 19 13:15:59 2006
@@ -158,10 +158,11 @@
my @content;
my @parts = $args{'Message'}->parts_DFS;
foreach my $part (@parts) {
+ my $body = $part->bodyhandle or next;
#if it looks like it has pseudoheaders, that's our content
- if ( $part->stringify_body =~ /^(?:\S+):/m ) {
- @content = $part->bodyhandle->as_lines();
+ if ( $body->as_string =~ /^(?:\S+):/m ) {
+ @content = $body->as_lines;
last;
}
}
More information about the Rt-commit
mailing list