Hi,
I’m using the Lotus Notes C++ 2.4 API to extract emails from a database. I’m running into problems extracting the email body for some emails. I’m using LNMailMessage::GetBody() to get the LNRichText object of the message body. I then use LNRichText::GetText to get the text. However, this fails for some emails and I get an LNSTATUS return value of 0xC00000BE, whose error message string is “A different rich text type is expected”. Does anyone know what this means? How can I extract the message body text in these cases?
Here’s a code snippet of what I’m doing:
LNMailMessage lnMail;
LNRichText lnrtBody;
LNSTATUS lnStatus;
// do: open mail and do any other processing
lnStatus = lnMail.GetBody(&lnrtBody);
if (lnStatus == LNNOERROR) {
LNString lnszText;
lnStatus = lnrtBody.GetText(&lnszText)
// do: do something with message text
}
// do: close mail and cleanup
BTW, I’ve also tried exporting the message body to RTF using LNRichText::Export but I get an LNSTATUS value of 0xC000011D (“Can’t find any export dll that supports the input file format”).