diff -r 36f374c67aa8 -r 12db4185673b email/imap4mtm/imapsession/src/cimapbodystructurebuilder.cpp --- a/email/imap4mtm/imapsession/src/cimapbodystructurebuilder.cpp Tue Jul 06 14:12:40 2010 +0300 +++ b/email/imap4mtm/imapsession/src/cimapbodystructurebuilder.cpp Wed Aug 18 09:45:25 2010 +0300 @@ -216,8 +216,16 @@ // Found a "MESSAGE/RFC822" body structure. // This contains an embedded bodystructure, so parse up to the structure, // and then allow the loop to parse the embedded structure. - ParseBodyTypeMessageRfc822L(); - parseStep = EParseNewBodyStructure; + TRAPD(err, ParseBodyTypeMessageRfc822L()); + if(err == KErrImapCorrupt) + { + parseStep =EParseRemainderMessageRfc822; + } + else + { + parseStep = EParseNewBodyStructure; + } + } break; case EParseRemainderMessageRfc822: @@ -520,13 +528,13 @@ { // body-fields SP SP body SP body-fld-lines ParseBodyFieldsL(); - - // envelope - ParseEnvelopeL(); - - // Expect a body substructure next. - // Position iAtomWalker at the opening bracket, ready for ParseBodyStructureTypeL - iAtomWalker->WalkAcrossL(ETrue); + TRAPD(err, ParseEnvelopeL()); + + // Expect a body substructure next. + // Position iAtomWalker at the opening bracket, ready for ParseBodyStructureTypeL + iAtomWalker->WalkAcrossL(ETrue); + if(err == KErrImapCorrupt) + CImapCommand::CorruptDataL(iLogId); } /**