SSL e-mail fetch loop:
- Code: Select all
vector<POP3ClientSession::MessageInfo>::const_iterator i;
session.login("username", "password");
POP3ClientSession::MessageInfoVec messages;
int idx, count = session.messageCount();
session.listMessages(messages);
for (idx = 0, i = messages.begin(); i != messages.end(); ++i, idx++)
{
MailMessage message;
session.retrieveMessage((*i).id, message);
//..
}
and for any given message, all fields (subject, from, body, etc) are fine except the
recipient list:
- Code: Select all
const MailMessage em;
int idx, got_to = FALSE;
const MailMessage::Recipients curr_to = em.recipients();
vector<MailRecipient>::const_iterator i;
for (idx = 0, i = curr_to.begin(); i != curr_to.end(); i++, idx++)
{
if (!idx)
s += "To: ";
else
s += ", ";
s += i->getAddress().c_str();
got_to = TRUE;
}
irregardless of the number and type of recipients (which look fine in gmail headers),
the loop above is never entered. iterator i always evaluates to "curr_to.end()" indicating
0 elements. Am I doing something inherently wrong? anyone else experience this problem?





