4 use RT::Test tests => 4, config => q{Set($CorrespondAddress, 'rt@example.com');};
7 my $queue = RT::Test->load_or_create_queue( Name => 'General' );
8 my $user = RT::Test->load_or_create_user( Name => 'bob', EmailAddress => 'bob@example.com' );
9 $queue->AddWatcher( Type => 'AdminCc', PrincipalId => $user->PrincipalObj->Id );
12 Subject: Badly handled multipart email
14 To: rt\@@{[RT->Config->Get('rtname')]}
15 Content-Type: multipart/alternative; boundary=20cf3071cac0cb9772049eb22371
17 --20cf3071cac0cb9772049eb22371
18 Content-Type: text/plain; charset=ISO-8859-1
22 --20cf3071cac0cb9772049eb22371
23 Content-Type: text/html; charset=ISO-8859-1
24 Content-Transfer-Encoding: quoted-printable
28 --20cf3071cac0cb9772049eb22371--
31 my ( $status, $id ) = RT::Test->send_via_mailgate($text);
32 is( $status >> 8, 0, "The mail gateway exited normally" );
33 ok( $id, "Created ticket" );
35 my @msgs = RT::Test->fetch_caught_mails;
36 is(@msgs,2,"sent 2 emails");
37 diag("We're skipping any testing of the autoreply");
39 my $entity = parse_mail($msgs[1]);
40 is($entity->parts, 2, "only two parts");