Hi all, I’m having trouble retrieving all the body text in a LNMailMessage. When I use the above method to get the desired text it only returns about half into the associated LNString. I’ve already verified that the problem is not due to the size of the note (its not greater than 64K; size is only about 1.4K). The body of the nested while() is never encountered/run.
My code follows. Any suggestions would be appreciated.
Thanks
LNSTATUS itemStatus = LNNOERROR;
LNMailMessage email;
LNRichText bodyTxt;
LNRTCursor bodyBegin;
LNRTCursor bodyEnd;
LNRTCursor body64;
LNString bodyStr;
LNSTATUS bodyStatus = LNWARN_TOO_MUCH_TEXT;
// open db
// get folder
// open folder
// go to first item in folder
// open item
while(itemStatus != LNWARN_NOT_FOUND){
email.GetBody(&bodyTxt);
bodyTxt.GetCursor(&bodyBegin);
bodyTxt.GetCursor(&body64);
bodyTxt.GetEndCursor(&bodyEnd);
bodyStatus = bodyTxt.GetText(&bodyStr,&body64);
while(bodyStatus == LNWARN_TOO_MUCH_TEXT){
LNString temp;
bodyStatus = bodyTxt.GetText(body64, bodyEnd, &temp, & body64);
bodyStr.Append(temp);
}
// etc, etc
}