2 u010051026 u010051026 于 2014.05.27 21:14 提问

POP3邮件接收怎么读取想要的信件信体部分

下面是读取信件信体的一段代码,有些不太明白
void CMailMessage::DecodeBody()
{
CString sCooked = "";
LPTSTR szBad = "\r\n..\r\n";
LPTSTR szGood = "\r\n.\r\n";
int nPos;
int nBadLength = strlen( szBad );
if( m_sBody.Left( 4 ) == "..\r\n" )
m_sBody = m_sBody.Mid(1);

while( (nPos = m_sBody.Find( szBad )) > -1 )
{
sCooked = m_sBody.Mid( 0, nPos );
sCooked += szGood;
m_sBody =sCooked+ m_sBody.Right( m_sBody.GetLength() - (nPos + nBadLength) );
}
}
程序运行出来信体部分是
-----=_Part_289181_79146947.1401189930373
Content-Type: text/plain; charset=GBK
Content-Transfer-Encoding: 7bit

123
------=_Part_289181_79146947.1401189930373
Content-Type: text/html; charset=GBK
Content-Transfer-Encoding: 7bit

123



------=_Part_289181_79146947.1401189930373--

请各位大神指教一下,我要怎么样修改程序才能让信体部分只显示 123 呢?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!