#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
my $text_part;
if ( $mime->head->get('Content-Type') =~ m{multipart/mixed} ) {
my $first = $mime->parts(0);
- if ( $first->head->get('Content-Type') =~ m{multipart/alternative} )
+ if ( $first && $first->head->get('Content-Type') =~ m{multipart/alternative} )
{
my $inner_first = $first->parts(0);
- if ( $inner_first->head->get('Content-Type') =~ m{text/plain} )
+ if ( $inner_first && $inner_first->head->get('Content-Type') =~ m{text/plain} )
{
$text_part = $inner_first;
}
}
elsif ( $mime->head->get('Content-Type') =~ m{multipart/alternative} ) {
my $first = $mime->parts(0);
- if ( $first->head->get('Content-Type') =~ m{text/plain} ) {
+ if ( $first && $first->head->get('Content-Type') =~ m{text/plain} ) {
$text_part = $first;
}
}
-eval "require RT::EmailParser_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/EmailParser_Vendor.pm});
-eval "require RT::EmailParser_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/EmailParser_Local.pm});
+RT::Base->_ImportOverlays();
1;