0
正如我試圖使用Poco庫建立電子郵件客戶端一樣。我發現我無法使用以下方法檢索內容。無法使用Poco庫檢索電子郵件內容
for (auto i = messages.begin(); i != messages.begin()+10; ++i)
{
MessageHeader header;
session.retrieveHeader((*i).id, header);
std::cout << "Subject:" << header.get("Subject");
std::cout << "Content" << header.get("Content");
/// Can't perform the above because there are no "Content:" in the
/// RFC2822.
}
///example in the RFC 2882
----
From : John Doe <[email protected](comment). example>
To : Mary Smith
__
<[email protected]>
Subject : Saying Hello
Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600
Message-ID : <1234 @ local(blah) .machine .example>
This is a message just to say hello.
So, "Hello".
----
而且也是「波蘇/網/ NameValueCollection中」,這是父類的MessageHeader不提供檢索電子郵件內容的方法。
const std::string& NameValueCollection::get(const std::string& name)
{
ConstIterator it = _map.find(name);
if (it != _map.end())
return it->second;
else
throw NotFoundException(name);
}
所以,我的問題是:有沒有其他方法可以檢索與poco庫的gmail消息?