How do I get the exact body of incoming mail if it is non-ascii mail?

D

dkdsnaidu

I am Naidu. I am developing ATL COM Addin for MS Outlook.I am trying t

get the exact body of incoming mails of Outlook.I can get the exac
body
of English mails. I can't get the exact body of Non-English mails.
I am giving rough code. Please correct me.

I need to know the charset(chinese, ascii or korea) of incoming mail
How?

STDMETHODIMP CMyClass::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(non-english) 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