From dae73e16b82d6af9e0b65d35af56499591a304ac Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 6 Aug 2014 13:41:10 +0200 Subject: [PATCH] Improved email error handling. --- app/models/channel/email_parser.rb | 20 ++++- test/fixtures/mail22.box | 69 ++++++++++++++++ test/unit/email_parser_test.rb | 98 +++++++++++++++++++++++ test/unit/email_process_test.rb | 122 ++++++++++++++++++++++++++++- 4 files changed, 305 insertions(+), 4 deletions(-) create mode 100644 test/fixtures/mail22.box diff --git a/app/models/channel/email_parser.rb b/app/models/channel/email_parser.rb index a161de696..c4eb040d1 100644 --- a/app/models/channel/email_parser.rb +++ b/app/models/channel/email_parser.rb @@ -122,6 +122,10 @@ class Channel::EmailParser data[:body] = mail.text_part.body.decoded data[:body] = Encode.conv( mail.text_part.charset, data[:body] ) + if !data[:body].valid_encoding? + data[:body] = data[:body].encode('utf-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '?') + end + # html attachment/body may exists and will be converted to text else filename = '-no name-' @@ -129,7 +133,11 @@ class Channel::EmailParser filename = 'html-email' data[:body] = mail.html_part.body.to_s data[:body] = Encode.conv( mail.html_part.charset.to_s, data[:body] ) - data[:body] = html2ascii( data[:body] ) + data[:body] = html2ascii( data[:body] ).to_s.force_encoding('utf-8') + + if !data[:body].valid_encoding? + data[:body] = data[:body].encode('utf-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '?') + end # any other attachments else @@ -188,6 +196,10 @@ class Channel::EmailParser data[:body] = mail.body.decoded data[:body] = Encode.conv( mail.charset, data[:body] ) + if !data[:body].valid_encoding? + data[:body] = data[:body].encode('utf-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '?') + end + # html part else filename = '-no name-' @@ -195,7 +207,11 @@ class Channel::EmailParser filename = 'html-email' data[:body] = mail.body.decoded data[:body] = Encode.conv( mail.charset, data[:body] ) - data[:body] = html2ascii( data[:body] ) + data[:body] = html2ascii( data[:body] ).to_s.force_encoding('utf-8') + + if !data[:body].valid_encoding? + data[:body] = data[:body].encode('utf-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '?') + end # any other attachments else diff --git a/test/fixtures/mail22.box b/test/fixtures/mail22.box new file mode 100644 index 000000000..74a98bdeb --- /dev/null +++ b/test/fixtures/mail22.box @@ -0,0 +1,69 @@ +From ireoniqla@lipetsk.ru Tue Aug 5 22:38:39 2014 +Return-Path: +X-Original-To: info@znuny.nix +Delivered-To: znuny-sales@arber.znuny.nix +Received: from X53.bbn2-087.lipetsk.ru (unknown [95.179.87.53]) + by arber.znuny.nix (Postfix) with ESMTP id A732E60260 + for ; Tue, 5 Aug 2014 22:38:38 +0200 (CEST) +Message-ID: +Date: Wed, 6 Aug 2014 00:38:37 +0400 +From: Gilbertina Suthar +MIME-Version: 1.0 +To: Info +Subject: P..E..N-I..S__-E N L A R-G E-M..E..N T-___P..I-L-L..S...Info. +Content-Type: text/html; charset=us-ascii; format=flowed +Content-Transfer-Encoding: quoted-printable +X-UID: 1429 +Status: RO +Content-Length: 3051 +Lines: 48 + +Puzzled by = +judith bronte dave. Melvin will want her way through with.
Continued = +adam helped charlie cried. Soon joined the master bathroom. Grinned adam = +rubbed his arms she nodded.
Freemont and they talked with = +beppe.
Thinking of bed and whenever adam.
Mike was too tired man = +to hear.
I°0PQSHEJlÔNwf˜Ì1§3S¬73 Î1mEbb5N37¢LϖC7AlFnRº♦HG64BÉ4Ò¦Måâ4ÊzkΙN⌉7⌉TBNÐ T×xPIògIÎÃlLøÕML⊥ÞøSaΨRBreathed adam = +gave the master bedroom door.
Better get charlie took the = +wall.
Charlotte clark smile he saw charlie.
Dave and leaned her = +tears adam.
Maybe we = +want any help me that.
Next morning charlie gazed at their = +father.
Well as though adam took out here. Melvin will be more money. = +Called him into this one last night.
Men joined the pickup truck = +pulled away. Chuck could make sure that.
†p­C L I C K = +;   Ȟ E R EEOD !Chuckled adam leaned forward and le=EE = +charlie.
Just then returned to believe it here.
Freemont and = +pulling out several minutes.
+ diff --git a/test/unit/email_parser_test.rb b/test/unit/email_parser_test.rb index 481655fbc..f5db95fa8 100644 --- a/test/unit/email_parser_test.rb +++ b/test/unit/email_parser_test.rb @@ -23,6 +23,13 @@ class EmailParserTest < ActiveSupport::TestCase :from_display_name => 'Martin Edenhofer', :subject => 'aaäöüßad asd', :body_md5 => "äöüß ad asd\n\n-Martin\n\n--\nOld programmers never die. They just branch to a new address.\n", + :body => "äöüß ad asd + +-Martin + +-- +Old programmers never die. They just branch to a new address. +" }, }, { @@ -369,6 +376,69 @@ Hof :from_display_name => 'Health and Care-Mall', :subject => 'The Highest Grade Drugs And EXTRA LOW Price .', :to => 'info2@znuny.com', + :body => "________________________________________________________________________Yeah but even when they. Beth liî ed her neck as well + +ó25aHw511IΨ11xG⌊o8KHCmς9-2½23QgñV6UAD12AX←t1Lf7⊕1Ir²r1TLA5pYJhjV gPnãM36V1E89RUDΤÅ12I92s2CΘYEϒAfg∗bT11∫rIoiš¦O5oUIN1Is2S21Pp Ÿ2q1FΧ⇑eGOz⌈F1R98y§ 74”lTr8r1H2æu2E2P2q VmkfB∫SKNElst4S∃182T2G1í lY92Pu×8>RÒ¬⊕ΜIÙzÙCC412QEΡºS2!XgŒs. + +2γ⇓B[1]cwspC L8I C K88H E1R?E2e31 !Calm dylan for school today. +Closing the nursery with you down. Here and made the mess. Maybe the oï from under his mother. Song of course beth touched his pants. +When someone who gave up from here. Feel of god knows what. + +TBϖ∃M5T5ΕEf2û–N¶1vΖ'1⇓∝5S2225 Χ0jΔHbAgþE—2i6A2lD⇑LGj2nTOy11H2τ9’:Their mother and tugged it seemed like + +d3RsV¶H2Θi¯B∂gax1bîgdH23r2Jÿ1aIK1² n1jfaTk1Vs3952 C˜lBl‘mxGo0√2XwT8Ya 28ksa∫f1ℵs”62Q 2Ad7$p32d1e∏2e.0”261a2Κ63αSM2 +Nf52CdL∪1i↔xcaa52R3l6Lc3i2z16só9èU zDE1aE21gs25Ë2 hE1cl⊃¢11o21µBw1zF1 q2kõaXUius1r0⊆ d•∈2$1Z2F1218l.07d56PÚl25JAO6 + +45loV2iv1i2ãΥ⌊a2⊃d2gÃΥ3™r22u¸aWjO8 n40–Soyè2u1∅23p1JΜNeÌ22jrá2rΚ 1229A2rAkc8nuEtl22ai‡OB8vSbéσeιõq1+65cw 2s8Uaò4PrsE1y8 ⟨fMElhϒ⋅Jo8pmzwjˆN1 wv39aW1WtsvuU3 1aœ1$2ΝnR2O2⌉B.∀2c→5Ê9χw5p1⁄N +fHGFVfE³2iσjGpa51kgg12cWrUq52akx2h 0F24P¸2L2rn22Ïo2Ý2HfoRb2eUαw6s2N‾ws¶13Βi2X1¸ofgtHnR⊥32ase92lF1H5 26B1a⊃2iϒsô12i ÅkMyl2J1ÄoQ–0ℑwvmù2 2ˆμ\"aQ7jVse62f 1h2p$L2r£3i1t2.323h5qP8g0♥÷R2 + +·iƒPV1Β∋øiF1R1a4v32gL9¢wr1722a2û0η þ12ßStu21u7á¡lp2ocEe1SLlrV2Xj ⊥Uµ1F¬48ðov71Arm242c2Vw2e1§⊇N 1242aLþZ2ski×5 c€pBlû26∂ol1fÚwKß32 4i2la4C12sRE21 ãeI2$2z8t442fG.¸1≤12F’Ã152in⊄ +Tl1ëC2v7Ci71X8a225NlþU⟩ιicO∑«s·iKN UuϒjS1j52u2Jü§pn5°1e¥Û3℘r1W‡2 J‹S7A1j0sc&1pkt1qq2iZ561vn81∗e22Q3+723Š ∑RkLaKX2as2s22 ï111lD2z8o278wwU–ÀC T6U2aϒ938s20Gÿ Ox2∈$98‘R21H25.ÒL6b9θrδ292f9j + +Please matt on his neck. Okay matt huï ed into your mind +Since her head to check dylan. Where dylan matt got up there + +1ȱΑAYQ1dN12ϒXT00ÀvI∨ío8-1b®8AΕ1V4LgÕ↑7LKtgcEiw1yR5Y22GRA1°I10C2C2Tiü/2wc0Ax211SÜÂ2ŒTÁ22òHpNâùM6È10A5Tb1:Simmons and now you really is what. Matt picked up this moment later that. + +251yV922Yeg1↑DnJ3l4t22b1os∏jll÷iS2iwBÎ4n021Ö 1f÷2a11l2suÚ82 2LCblgvN½o1oP3wn♠90 FZora&M™xsΚbb1 251ξ$12·22iG2∇1⊇Ξ¬3.0P0κ53V1203ÝYz +2X¢BAZ4Kwddu2vvuB↑Βa1’THi0—93rZεj0 1rΜ1a2111s71Ιf 8⇓2olW„62o6yH¥wKZ∧6 21h2aKJ“ℜs48IÌ 21¬1$ZΣ122ñ26B42YMZ.21V19f10å54⌈R8 + +2w\"9N2gBÀa2Sê1s≅gGÔo0Dn4n↵γ7⊗eS7e2xf3Jd q÷CMa221isNMZp zz0˜lΚLw8o229ww1§Qu 1D⌈ía2212sJ811 3où2$¦1Nℜ1>R2t7WPM1.181D92k5D9∗8≈R +l131Sj1Ψ8pΣ2Kùi6rr2rbÛu¬i2V∗∏v5ª10a27B1 Ú♦Ξsa9j3χsa1iΟ Oi℘ml6óf2owbz∀wA6ù→ 22b2ai1wbs♦βGs 281i$iÀˆ12⊃2wC82n8o.13NJ9S11Θ0P1Sd + +What made no one in each time. +Mommy was thinking of course beth. Everything you need the same thing + +P2EVG29srEx⇐9oN3U1yE2i2OR5kÇÿAΤηνULP¿∧q R5¿FHt7J6E»1C∅A2∃aVLu∗¢tT⟨21šHq9Né: + +⊥Þ21T11BrrC712adš6lmzb16ai07tdBo×KopíΡ1lj4Hy 2aÓ1aÖí∉Ós1a2’ 4D1kleow2o3–12wjR≤Π 1Rh2af27≅s26u2 8NLV$∪⇓1↓1Y¶21.v2È232S7202n11 +m5VKZy3K2iñ21DtÚ2HrhGaMvr5ïR1o11namΜw22anFu8x7⌈sU E4cva11ε™s7ΑGO dA35ldñÌèoAξI1wXK2n f1x¾a∏7ffs†222 5msC$72t10z„n2.it1T7O8vt5182· + +Jï12PkáO1rn2rAo8s5∅z—4Rha11t˜cq5YΧ ΤQ2ra2⌋4¹sÜ51§ 2VBιluw2ioL32Bw1111 5∈22a1I22sšÛ21 G17ρ$kJM80∼∠ℵl.J1Km3212⊃52鼧 +p121A1NU0c¥x2fo⟨22cm14QGpHEj7lnDPVieV21aΠ2H7 1j26azBSesë1c9 ´2Ù¬l0n21o22RVw1X1Ï αV21a≅σ1Zs§jJå 3pFN$1Kf821YΟ7.32Y95JΑqŸ0v91Q + +ñ↑yjPΤ1u6rFwhNeCOϖ2d5Γêcne¼a0iTF15sxUS0o88ℵ1laÅT℘oOB11n2111e∧Kpf υ98ξabp†3sj82& 9©Bol2AWSo7wNgw21mM tteQat0ϖ2s4≡NÇ ÕÆ1Θ$2R2q0117ª.mt111—uwF57H♣f +æ∪HYSjψ3Byš1g1ndX15t1126hZ⇒y2r82mdowy2diψ8YΗd0ršŠ N029a13I¦sQaý2 20Y7lZ118o∫50Çw1\"1Ζ n6Ü≥a∇lßnsF›J9 1DΟK$142L0S7z2.Ta2X31R9953911 + +Turning to mess up with. Well that to give her face +Another for what she found it then. Since the best to hear + +GX1♦Ca2isA18¡bN2î81A22zΘD∇tNXIfWi–Ap2WYNYF1b ≠7yφDpj6©R04E1U1ñn7G1o2jS111∋TC⊥πËO1∗21RtS2wE6621 ν222ASi21DP“8λV∧W⋅OA2g6qNtNp1T269XA7¥11GGI6SEwU22S3Χ12!Okay let matt climbed in front door. Well then dropped the best she kissed + +122C>Φ221 flQkWMŠtvo2dV1rT1ZtlN6R9dZ12LwuD19i3B5FdcÆl2eSwJd K1tDDfoX±evrýwlK7P÷i1e13v2zèCe¬Μ♣ΝrGhs2y172Y!gZpá R6O4O112∋r92Z1dB6i1e2σ∼ÓrCZ1s 122I31e2¤+⌉CêU 1k6wG1c‚1o60AJoR72sd3i11s22pt Ø277a2∀f5np¤n2duE8⇒ 21SHGJVAtew∇Lëtς2D2 6k28FgQQ⊂R81L2EI2∉iEHÍÉ3 H2r5Af1qximςρ‡r6©2jmWv92aW21giAC21lM⌋1k 2V2¸S2ùθ2h15BΙi∗ttEp8¢EPpSzWJi32U2n5ìIhgx8n⌉!j∏e5 + +x1qJ>mC7f 512y1GA420lCQe09s9u%uksã ψ2X5A4g3nu←Τyst72pMhšg12e⟩pÚ1n1YƒŠtÉ2LGizqQ↓c3tÙI œïbXMKÛRSertj2d\"Ot2ss581!oo2i FÂW2EW2DDx7hI2pΦS2Bi2drUr⇔J<2a1Αzwt01p2i28R2oH21Än172r 1122DYvO7ak21ht204Πe∂λ11 12dUoο1X3fc631 e&∪GOxT3CvXcO1e3K2νr31y2 262z31∞I1 Pì∃zYt6F4e6è⇓va5229rkΘ32sKP5R!ιµmz + +3212>22′L 2óB⊥S∩OQMeý∉2Φc229Tu2a∫dr25ûMeLk92 121OOø9oKnÿψÀWl7H2∅i9ρÈ2ni2•2eXPxí 1251SUqtBh72a5otSZ9p222Dpf1Ý2i2ωbjn11Ÿ2gs2h− bå2swx2oSiq8hvt2262h⌈b²S 26þSVBEFCi2Uàds9Ñ1Εa11ξ2,1„wv jw7AMK2↔la2G91s23«etuB2keDã2ìr1¨IeC¾EaÄao÷″∧r>6e1d9D21,mtS2 I∗44A1Rˆ2M98zME≅QŸÐX¹4j6 20n3a1'22nxpl6d832J 06Ð9E22ý2-2829c42r2h72¥med½♠kc23sPk12•r!⟩QCa + +Še21>1σ12 bpøNERN8eaD61ns7Abhy±12∩ D7sVR8'1Ee22DVfc˜32u72Æqnc23qd2∼4∇sρmi5 6212a21∝TnQb9sd1Mùℑ ∑gM22bN2¶4cä½⊆/4X1κ71f1z ϖ12ECzf•1uMbycs1•9¾ts0T2o3h2DmSs31e7B2Ér2⋅22 φ81″SSXð1uúI15p58uHp2c2±o∂T1Rrd6sMt∪1µξ!24Xb + +Both hands through the fear in front. +Wade to give it seemed like this. Yeah but one for any longer. Everything you going inside the kids. + + +[1] http://pxmzcgy.storeprescription.ru?zz=fkxffti +" }, }, { @@ -382,6 +452,34 @@ Hof :to => 'info@znuny.nix', }, }, + { + :data => IO.read('test/fixtures/mail22.box'), + :body_md5 => '57cf207fb52f01f107ae008eb2f8d6cc', + :params => { + :from => 'Gilbertina Suthar ', + :from_email => 'ireoniqla@lipetsk.ru', + :from_display_name => 'Gilbertina Suthar', + :subject => 'P..E..N-I..S__-E N L A R-G E-M..E..N T-___P..I-L-L..S...Info.', + :to => 'Info ', + :body => "Puzzled by judith bronte dave. Melvin will want her way through with. +Continued adam helped charlie cried. Soon joined the master bathroom. Grinned adam rubbed his arms she nodded. +Freemont and they talked with beppe. +Thinking of bed and whenever adam. +Mike was too tired man to hear.I10PQSHEJl2Nwf˜2113S173 Î1mEbb5N371LϖC7AlFnR1♦HG64B242¦M2242zkΙN⌉7⌉TBNÐ T2xPIògI2ÃlL2ÕML⊥22SaΨRBreathed adam gave the master bedroom door. +Better get charlie took the wall. +Charlotte clark smile he saw charlie. +Dave and leaned her tears adam.Maybe we want any help me that. +Next morning charlie gazed at their father. +Well as though adam took out here. Melvin will be more money. Called him into this one last night. +Men joined the pickup truck pulled away. Chuck could make sure that.[1]†p1C?L I?C K?88 5 E R?EEOD !Chuckled adam leaned forward and le? charlie. +Just then returned to believe it here. +Freemont and pulling out several minutes. + + +[1] http://аоск.рф?jmlfwnwe&ucwkiyyc +", + }, + }, ] files.each { |file| diff --git a/test/unit/email_process_test.rb b/test/unit/email_process_test.rb index 24c5aa1f9..544740886 100644 --- a/test/unit/email_process_test.rb +++ b/test/unit/email_process_test.rb @@ -129,6 +129,124 @@ Some Text", }, }, }, + { + :data => IO.read('test/fixtures/mail21.box'), + :success => true, + :result => { + 0 => { + :priority => '2 normal', + :title => 'World Best DRUGS Mall For a Reasonable Price.', + }, + 1 => { + :body => '_________________________________________________________________________________Please beth saw his head + +92hH3ÿoI221G1¿iH16u-2◊NQ422U1awAq¹JLZμ2IicgT1ζ2Y7⊆t 63‘M236E2Ý→DA2†I048CvJ9A↑3iTc4ÉIΥvXO502N1FJSð1r 154F1HPO11CRxZp tLîT9öXH1b3Es1W mN2Bg3õEbPŒS2fτTóY4 sU2P2ζΔRFkcI21™CÓZ3EΛRq!Cass is good to ask what that + +86Ë[1]2u2C L I C1K   H E R E28MLuke had been thinking about that. +Shannon said nothing in fact they. Matt placed the sofa with amy smiled. Since the past him with more. Maybe he checked the phone. Neither did her name only. Ryan then went inside matt. +Maybe we can have anything you sure. + +á•XMY2ÅEE12N°kP\'dÄ1S4⌉d √p¨HΣ>jE4y4AC22L2“vT∧4tHX1X: + +x5VV"1ti21aaΦ3fg¦z2r1°haeJw n1Va879sÆ3j f1ïl29lo5F1wν11 κψ›a9f4sLsL 2Vo$v3x1¸nz.u2¦1H4s3527 +yoQC1FMiMzda1ZεlÝHNi1c2s2–ϖ DYhaã7Ns421 n3dl1X1o11¶wpN↑ YQ7a239s1q2 QyL$fc21ΝS5.5Wy621d5Ä1H + +17∂ 3n6ax1Qs20b °Häl91ÑoÏ6aw≡d2 ΗÅ2a1Óvs⊃17 C⊆1$2Bz2sl2.∫Pb5ØMx0oQd + +ZΙμPCqmrµp0eAΦ♥dô‾Ωn∠2si4y2s28«o6∀ClDeÌoPbqnd1Jelè2 2ˆ5aWl⟨sbP2 2²2l8¢OoH¸ew’90 Υ66a21dsh6K r61$7Ey0Wc2.£—012C857Aþ +i1σS€53yxµ2n80ntΡΠmhç≡hrB1doµS1ih2rdOKK 712a←2Is2⌉V Cssl1´RoT1QwyÉΔ •∏∞a2YGs18E 1πx$04ò0gMF.bTQ3Íx6582ς + +Maybe even though she followed. +Does this mean you talking about. Whatever else to sit on them back + +←4BC32hAGAWNr2jAGυ»D1f4I2m√AHM9N⟩12 ‚1HD19ÜR23∨U90IG199S1∪”T123O2°cR0E⇑E211 42aA″XΝD14ℑVAK8A1d9Nr1DT112A5khGA3mE98ÔS9KC!5TU + +AMm>EjL w∗LWυIaoKd1rΘ22l2IΚdê5PwO4Hi2y6dÖH⌊eÃìg j14Dr15e700lH12iJ12vY…2e1mhr114yrÆ2!∑η2 21υOΔfδrKZwd4KVeB12rℜ01 PΖ2341o+A7Y 126GM17oGOºos7∑d272s18P ο♦QaRn–n5b2d02w 2rϒGI2ℑem0∀t1b2 20rF4O7R221E12⊆ESΥ4 KF0A212i5ïcrt⊆€mRJ7aNΛ2in26l5bQ 1ϒtSZbwh3¶3ig♠9p2″2p×12iK11nsWsgdXW!tBO + +m0W>Y2 b1u1xΔd03¯¬0vHK%21ó 674Aj32uQ←ÏtÈH1houqey1Yn221t⌋BZi1V2c1Tn >ZΓM222e311d2s5s22›!102 2¡2Em21x2V2p1∨6i2dârB9ra72mtSzIiMlVo0NLngΒû 22LD7⇑maNx3tUζ∪etc2 902o123fv49 w≅1O0giv12YeX2NryfT 3fP3xZ2 F2ÃY8q1eE1ÜaâyfrΜpls92Â!qκ2 + +î5A>∀pƒ ZµÍSδ32em2sc⊕7vu41JrÒ1we2yh qaρO2p¼nΣxZlrN1i♠2cnl4jeN1Q y2≅Sb63h17⟩of1ypÅA1pþh0iÔcbnec4gI21 h2Uw23‹i92ktS12h6V1 g1sVŒ2uipV1se2⋅a42V,T6D 228MΡY1a⊃ºΕs5ù2t9IDeFDℑrXpOCe“μan1Mr11Kd122,e27 DfmA21NM92hEU2∨XσψG 4j0a181nhTAdmT2 192Eνμr-U4fc121h8ª¸eoycc9xjk⁄ko!29K + +12…>J6Á 1⟩8EÖ22a141s117y3â8 1f2R6olewtzfw¹suýoQn⇓³³d24Gs¢7« AlDa1H1n9Ejdtg› 12θ2ε1⊇41″A/42v72z→ 231C622u56Xs9⁄1t∑ΙioxÉjm2R2e1W2rH25 o¥2S≥gmuX2gp3yip·12oD13rc3μtks∪!sWK + +When she were there you here. Lott to need for amy said. +Once more than ever since matt. Lott said turning o ered. Tell you so matt kept going. +Homegrown dandelions by herself into her lips. Such an excuse to stop thinking about. Leave us and be right. + +[2] + +Это сообщение свободно от вирусов и вредоносного ПО благодаря [3]avast! Antivirus защита активна. + + + +[1] http://piufup.medicatingsafemart.ru +[2] http://www.avast.com/ +[3] http://www.avast.com/ +', + :sender => 'Customer', + :type => 'email', + :internal => false, + }, + }, + }, + { + :data => IO.read('test/fixtures/mail22.box'), + :success => true, + :result => { + 0 => { + :priority => '2 normal', + :title => 'P..E..N-I..S__-E N L A R-G E-M..E..N T-___P..I-L-L..S...Info.', + }, + 1 => { + :body => "Puzzled by judith bronte dave. Melvin will want her way through with. +Continued adam helped charlie cried. Soon joined the master bathroom. Grinned adam rubbed his arms she nodded. +Freemont and they talked with beppe. +Thinking of bed and whenever adam. +Mike was too tired man to hear.I10PQSHEJl2Nwf˜2113S173 Î1mEbb5N371LϖC7AlFnR1♦HG64B242¦M2242zkΙN⌉7⌉TBNÐ T2xPIògI2ÃlL2ÕML⊥22SaΨRBreathed adam gave the master bedroom door. +Better get charlie took the wall. +Charlotte clark smile he saw charlie. +Dave and leaned her tears adam.Maybe we want any help me that. +Next morning charlie gazed at their father. +Well as though adam took out here. Melvin will be more money. Called him into this one last night. +Men joined the pickup truck pulled away. Chuck could make sure that.[1]†p1C?L I?C K?88 5 E R?EEOD !Chuckled adam leaned forward and le? charlie. +Just then returned to believe it here. +Freemont and pulling out several minutes. + + +[1] http://аоск.рф?jmlfwnwe&ucwkiyyc +", + :sender => 'Customer', + :type => 'email', + :internal => false, + }, + }, + }, ] process(files) end @@ -311,9 +429,9 @@ Some Text', if file[:result][level] file[:result][level].each { |key, value| if result[level].send(key).respond_to?('name') - assert_equal( result[level].send(key).name, value.to_s) + assert_equal( value.to_s, result[level].send(key).name ) else - assert_equal( result[level].send(key), value) + assert_equal( value, result[level].send(key)) end } end