use strict; use warnings; use RT::Test tests => 66; RT->Config->Set('CheckMoreMSMailHeaders', 1); # 12.0 is outlook 2007, 14.0 is 2010 for my $mailer ( 'Microsoft Office Outlook 12.0', 'Microsoft Outlook 14.0' ) { diag "Test mail with multipart/alternative"; { my $text = <Config->Get('rtname')]} Subject: outlook basic test Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01CB045C.A5A075D0" ------=_NextPart_000_0004_01CB045C.A5A075D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit here is the content blahmm another line ------=_NextPart_000_0004_01CB045C.A5A075D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable this is fake ------=_NextPart_000_0004_01CB045C.A5A075D0-- EOF my $content = <Config->Get('rtname')]} Subject: outlook basic test Content-Type: multipart/mixed; boundary="----=_NextPart_000_000F_01CB045E.5222CB40" ------=_NextPart_000_000F_01CB045E.5222CB40 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0010_01CB045E.5222CB40" ------=_NextPart_001_0010_01CB045E.5222CB40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit foo bar baz ------=_NextPart_001_0010_01CB045E.5222CB40 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable this is fake ------=_NextPart_001_0010_01CB045E.5222CB40-- ------=_NextPart_000_000F_01CB045E.5222CB40 Content-Type: text/plain; name="att.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="att.txt" this is the attachment! :)=0A= ------=_NextPart_000_000F_01CB045E.5222CB40-- EOF my $content = <Config->Get('rtname')]} Subject: outlook basic test Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit foo bar baz EOF my $content = <Config->Get('rtname')]} Subject: outlook basic test Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 VGhpcyBpcyB0aGUgYm9keSBvZiBhbiBlbWFpbC4KCkl0IGhhcyBtdWx0aXBs ZSBleHRyYSBuZXdsaW5lcy4KCgoKTGlrZSBhIG1hbmdsZWQgT3V0bG9vayBt ZXNzYWdlIG1pZ2h0LgoKCgpKb2huIFNtaXRoCgpTb21lIENvbXBhbnkKCmVt YWlsQHNvbWVjby5jb20KCg== EOF my $content = <Config->Get('rtname')]} Subject: outlook basic test Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-MS-Has-Attach: X-MS-Tnef-Correlator: VGhpcyBpcyB0aGUgYm9keSBvZiBhbiBlbWFpbC4KCkl0IGhhcyBtdWx0aXBs ZSBleHRyYSBuZXdsaW5lcy4KCgoKTGlrZSBhIG1hbmdsZWQgT3V0bG9vayBt ZXNzYWdlIG1pZ2h0LgoKCgpKb2huIFNtaXRoCgpTb21lIENvbXBhbnkKCmVt YWlsQHNvbWVjby5jb20KCg== EOF my $content = <Config->Get('rtname')]} Subject: outlook basic test Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01CB045C.A5A075D0" ------=_NextPart_000_0004_01CB045C.A5A075D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit foo bar baz ------=_NextPart_000_0004_01CB045C.A5A075D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable this is fake ------=_NextPart_000_0004_01CB045C.A5A075D0-- EOF my $content = <; Tue, 17 Jul 2012 10:11:51 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CD63FC.33F4C15C" Content-class: urn:content-classes:message Subject: outlook basic test Date: Tue, 17 Jul 2012 10:11:50 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Testing Outlook HTML Thread-Index: Ac1j/DNs7ly963bnRt63SJw9DkGwyw== From: root\@localhost To: rt\@@{[RT->Config->Get('rtname')]} This is a multi-part message in MIME format. ------_=_NextPart_001_01CD63FC.33F4C15C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This email contains a line of text containing multiple sentences. Where will RT wrap this when the text is quoted? What about the footer below? =20 This is a different line, with a blank line (paragraph) above. Will there be additional blank lines when the text is quoted? =20 This isthesig =20 ------_=_NextPart_001_01CD63FC.33F4C15C Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

This email = contains a line of text containing multiple sentences.  Where will = RT wrap this when the text is quoted?  What about the footer = below?

 

This is a different line, with a blank line = (paragraph) above.  Will there be additional blank lines when the = text is quoted?

 

This isthesig =

 

------_=_NextPart_001_01CD63FC.33F4C15C-- EOF my $content = <send_via_mailgate($text); is( $status >> 8, 0, "The mail gateway exited normally" ); ok( $id, "Created ticket" ); my $ticket = RT::Test->last_ticket; isa_ok( $ticket, 'RT::Ticket' ); is( $ticket->Id, $id, "correct ticket id" ); is( $ticket->Subject, 'outlook basic test', "subject of ticket $id" ); my $txns = $ticket->Transactions; $txns->Limit( FIELD => 'Type', VALUE => 'Create' ); my $txn = $txns->First; is( $txn->Content, $content, $msg ); }