diff -r eceabb8c7a12 -r d8ac8e5e4721 email/imap4mtm/imapsession/src/cimapatomparser.cpp --- a/email/imap4mtm/imapsession/src/cimapatomparser.cpp Tue Sep 14 12:19:12 2010 +0530 +++ b/email/imap4mtm/imapsession/src/cimapatomparser.cpp Tue Sep 14 22:54:56 2010 +0530 @@ -125,6 +125,7 @@ // Add to the parsed buffer void CImapAtomParser::BufferAppendL(const TChar aChar) { + ++iAttachmentLength; // Check for internal programming error __ASSERT_DEBUG(iBuffer != NULL, TImapServerPanic::ImapPanic(TImapServerPanic::EAtomParserBufferIsNull)); @@ -337,6 +338,13 @@ // Note that the CRLF will already have been stripped out by CImapSession // so we are treating a CR on its own as whitespace { + // if white space is there in the attched file's name,it will add to the buffer. + if( iAttachmentLength < iLiteralLength) + { + BufferAppendL(octet); + break; + } + AddAtomL(); // Either go back to looking for an atom, or a LF @@ -445,6 +453,7 @@ // Skipping... if (--iLiteralSkip==0) { + iAttachmentLength = 0; // Is literal 0 bytes long? if (iLiteralLength==0) {