[otrs-cvs] otrs/scripts/test/EmailParser NestedMessage.t,NONE,1.1
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/otrs/scripts/test/EmailParser
In directory lancelot:/tmp/cvs-serv2198/scripts/test/EmailParser
Added Files:
NestedMessage.t
Log Message:
- 2012-11-29 Fixed bug#1970 - Email attachments of type .msg (Outlook-Message) are converted.
Author: mg
--- NEW FILE: NestedMessage.t ---
# --
# NestedMessage.t - email parser tests
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: NestedMessage.t,v 1.1 2012/11/29 12:39:49 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
use strict;
use warnings;
use vars (qw($Self));
use utf8;
use Kernel::System::EmailParser;
my $Home = $Self->{ConfigObject}->Get('Home');
# test for bug#1970
my @Array = ();
open( IN, "< $Home/scripts/test/sample/EmailParser/NestedMessage-Test1.box" );
while (<IN>) {
push( @Array, $_ );
}
close(IN);
# create local object
my $EmailParserObject = Kernel::System::EmailParser->new(
%{$Self},
Email => \@Array,
);
my @Attachments = $EmailParserObject->GetAttachments();
$Self->Is(
scalar @Attachments,
3,
"Found 3 files (plain, html and attachment for nested message)",
);
$Self->Is(
$Attachments[2]->{Filename} || '',
'[Presse-Greenpeace] Morgen wird Greenpeace-Einspruch gegenEmbryonen-Patent verhandelt - NeueDokumentation ueber Patente auf Leben.eml',
"Nested message filename",
);
1;
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log