How to get the exact body of incoming mail?

D

Dkds.Naidu

Hi folks,

I am Naidu. I am developing ATL COM Addin for MS Outlook.I am trying to
get the exact body of incoming mails of Outlook.I can get the exact body
of English mails. I can't get the exact body of Non-English mails.
I am giving rough code. Please correct me.

STDMETHODIMP CExchangeAddin::OnDelivery(IExchExtCallback *lpExchangeCallback)
{
LPMESSAGE lpMessage= NULL;
LPMDB lpMdb = NULL;
ULONG ulPropCount = 0;
LPSPropValue lpMessageProps = NULL;
if (SUCCEEDED(lpExchangeCallback->GetObject(&lpMdb, (LPMAPIPROP*)
&lpMessage)))
{
static SizedSPropTagArray(1,PropTagArray) ={1, {PR_BODY}};
if (SUCCEEDED(lpMessage->GetProps((LPSPropTagArray)
&PropTagArray,0,&ulPropCount,&lpMessageProps)))
{
if (PROP_TYPE(lpMessageProps[0].ulPropTag) != PT_ERROR)
{
MessageBox(NULL,lpMessageProps[0].Value.lpszA,"Ascii
Text",MB_OK);//I can get the English mail body.
//How Can I get the CHINESE text.
//How can I know this mail is chinese(non-english)
mail or English mail.
}//End of PR_BODY

}//End of GetProps

}//End of GetObject

return S_FALSE;

}//End of OnDelivery

Thanks in advance.
Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top