fix multipart mail compliance, and layout cpu burn issue