C++ 无法使用Poco库检索电子邮件内容

C++ 无法使用Poco库检索电子邮件内容,c++,email,gmail,poco-libraries,C++,Email,Gmail,Poco Libraries,当我试图用Poco库构建一个电子邮件客户端时。我发现我无法使用以下方法检索内容 for ( auto i = messages.begin(); i != messages.begin()+10; ++i ) { MessageHeader header; session.retrieveHeader((*i).id, header); std::cout << "Subject:" << header.get("Subject"); s

当我试图用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.
}

所以,我的问题是:有没有其他方法可以通过poco库检索gmail消息?

我在poco github页面上发布了这个问题。 答复是:

///////////

还有其他方法可以检索gmail邮件吗?

是,使用MailMessage::getContent()

///////////

这确实解决了我的问题

///example in the RFC 2882
----
From  : John Doe <jdoe@machine(comment).  example>
To    : Mary Smith
__
          <mary@example.net>
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".
----
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);
}